private void MakeH6ToolStripMenuItem_Click(object sender, EventArgs e) { TabPage tb = tabControl1.SelectedTab; if (tb as EditorTabPage == null) { return; } EditorTabPage etb = tb as EditorTabPage; etb.MakeH("6"); }