Mildred Shimz
Mildred Shimz

Reputation: 617

menustrip tool in c sharp

im trying to work with the menustrip and i have the helpToolStripMenuItem_Click may someone help me the code on how to put the documentation i.e if i click help a new window show appear with documentation like this picture i capture from a vlc help button enter image description here

any ideas this is my empty code

private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

Upvotes: 2

Views: 305

Answers (4)

Dmitry Nikolaev
Dmitry Nikolaev

Reputation: 3918

To get the same result as in the image you posted, you need to create a new form, put a WebBrowser control to it and load the HTML page with the documentation to this control in the form's initialization code:

public HelpForm()
{
  InitializeComponent();

  string text = System.IO.File.ReadAllText(@"Docs\readme.html");
  webBrowser1.DocumentText = text;
}

Here, the code reads HTML from the readme.html file located in the Docs subfolder of the folder where the EXE file is located.

Upvotes: 1

Likurg
Likurg

Reputation: 2760

Make form (for example with name frm_Help) with RichTextBox and Button In Richtextbox add all text (read this Richtextbox) In button event click add

{
   Close();
}

Somewhere where you want to show this form add

{
   frm_Help frm=new frm_Help;
   frm.ShowDialog();
}

Upvotes: 1

Vinod
Vinod

Reputation: 4892

Create a new form or add AboutBox and add RichTextbox control.

Upvotes: 0

JleruOHeP
JleruOHeP

Reputation: 10386

You should create new form, containing all the text you want in it and in helpToolStripMenuItem_Click you should create new instance of that form and show it (as a dialog maybe)

Upvotes: 0

Related Questions