title: how call main form method inside another form using C#?
body: <pre><code> public partial class Form1 : Form
  {
  
      String Path1 = Application.StartupPath + "\\component.xml";
      XmlDataDocument xmlDatadoc = new XmlDataDocument();
  
      public Form1()
      {
          InitializeComponent();
      }
  
      XmlDocument dom;
      TreeNode tNode;
      const int NORM_UI = 0;
      const int SELECTED_UI = 1;
  
      private void Form1_Load(object sender, EventArgs e)
      {
  
          this.treeview();
      }
  
    public void treeview()
      {
          try
          {
  
              dom = new XmlDocument();
              dom.Load(Path1);
  
  
              treeView1.Nodes.Clear();
              treeView1.Nodes.Add(new TreeNode(dom.DocumentElement.Name));
              tNode = new TreeNode();
              tNode = treeView1.Nodes[0];
              tNode.ForeColor = Color.Blue;
  
  
  
              AddNode(dom.DocumentElement, tNode, NORM_UI, -1);
          }
          catch (XmlException xmlEx)
          {
              MessageBox.Show(xmlEx.Message);
          }
          catch (Exception ex)
          {
              MessageBox.Show(ex.Message);
          }
  
      }
  </code></pre>
  
  <p>i want to call this treeview () method when button 2 click in following form please help me </p>
  
  <pre><code> public partial class TabPageEntry_Form2 : Form
  {
      public TabPageEntry_Form2()
      {
          InitializeComponent();
      }
  
  
  
      private void button2_Click(object sender, EventArgs e)
      {
  
      }
  </code></pre>