1
Answer

C# EventHandler

j

j

16y
3.7k
1

I am trying to make an EventHandler for a ToolStripMenuItem Click event, however I would like to do something like this:

 

The following code is Java:

I am trying to make an EventHandler for a ToolStripMenuItem Click event, however I would like to do something like this:

 

The following code is Java:

 

  Frame f = new Frame("Checking the mouse click");
  f.addWindowListener(new WindowAdapter(){
        public void windowClosing(WindowEvent we){
            System.exit(0);
        }
  });

 

is there a way to do this in C#?

 

something like:

 

ToolStripMenuItem menuJob = new ToolStripMenuItem();

menuJob.Click += new EventHandler(

Answers (1)