I want to create a window which shows a graphic.
There are 4 menu items within a menustrip. When clicking on the menu item the DetailsGraph window will be appear. But in this form I want to get the name of which menu item was clicked to open this form. So, I will show the precise graph on the my form.
private void menuItemTemp_Click(object sender, EventArgs e)
{
(new GraphOneWindow()).Show();
}
private void menuItemConductivity_Click(object sender, EventArgs e)
{
(new GraphOneWindow()).Show();
}
In which function can I get the sender object inside GraphOneWindow.cs ?
Pass sender to forms constructor: