Marko Marko - 1 year ago 79
C# Question

How to add an event on a menu in C# visual basic project?

I have a C# Visual Basic Windows Forms App that contain a menu bar.
I want to display a Help Message when I press on the "HELP" menu button.

All that I can see when I press view code is this:

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)


I think that I need to create inside the function a MessageBox or an event that will display the desired message.
Do you have any idea how should I do this, please?

Answer Source

Below should work for what your asking. If you are on your form you can double click the button you want to interact with, and Visual Studio should take you to the empty method.

private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        MessageBox.Show("This is supposed to be helpful");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download