Marko Marko - 2 months ago 5x
C# Question

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

I have a C# 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?


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");