I have a form1 with a menustrip and tabcontrol that form2 opened in tabpage1 . I want to run a public function from form2 when i click on a ToolStripMenuItem . form2 opened with this code :
form2 sar = new form2(usrnm);
sar.TopLevel = false;
sar.WindowState = FormWindowState.Maximized;
sar.FormBorderStyle = FormBorderStyle.None;
TabPage tb = new TabPage();
tb.Controls.Add(sar);
sar.Parent = tb;
tabControl1.TabPages.Add(tb);
sar.Show();
tabControl1.SelectTab(tb);
tabControl1.SelectedTab.Text = "Oncor Daily";
I have a public void savenewform()
function in form2 and i want to run that . I don't know how can i do this .