title: C# Manage SubForm from MainForm
body: <p>I have a main form(fGraph) and a sub form (fScheduller). In the main form
  I need to send a value to the sub-form and call refresh void in the sub form,
  but I receive an exception: <strong>System.NullReferenceException</strong>: 'Object reference not set to an instance of an object.' </p>
  
  <p>How can I manage the sub form from the main form?</p>
  
  <p>the main form:</p>
  
  <pre><code>namespace WorkSpace
  {
      public partial class fGraph : DevExpress.XtraBars.Ribbon.RibbonForm
      {
          private void fGraph_Load(object sender, EventArgs e)
          {            
              _fScheduller = new SpecialForms.fScheduller();
              _fScheduller.FormBorderStyle = FormBorderStyle.None;
              _fScheduller.TopLevel = false;
              _fScheduller.ShowInTaskbar = false;
              _fScheduller.Show();
              _fScheduller.Dock = DockStyle.Fill;
              layoutControlGroupSchedule.Controls.Add(_fScheduller);
          }
          private void reload()
          {
              _fScheduller.fillSceduleControls(Convert.ToInt64(current["SCHEDULE_ID"]));
              // EXCEPTION : System.NullReferenceException: 'Object reference not set to an instance of an object.'
          }
      }
  }
  </code></pre>
  
  <p>the sub form:</p>
  
  <pre><code>namespace SpecialForms
  {
      public partial class fScheduller : Form
      {
          public fScheduller()
          {
              InitializeComponent();
          }
          public void fillSceduleControls(long sched_id)
          {
  
              leScFreqType.EditValue = GetFreqType(sched_id);
          }
      }
  }
  </code></pre>