title: InvalidOperationException was unhandled.. I'm not seeing the logic error? VB.net
body: <p>As a newbie to VB.Net, very casual programmer. i am struggling to find the logic error in this statement. It says I am recursively calling the Form, but I don't see it.</p>
  
  <p>I have a created new module outside of the Form class where I am initialising all my functions from. In this function I request the text data from a few textboxes. </p>
  
  <pre><code>' ----- A function within a module -----
  Private Function run_stress_function()
      'Building my class
      Dim req_width As New Pocket_Stress_Function(CDbl(frmMain.txtPBend.Text),
                                                  CDbl(frmMain.txtPAllow.Text),
                                                  CDbl(frmMain.txtPthick.Text),
                                                  CDbl(frmMain.txtPwidth.Text), 1.5)
      Return req_width.Flange_width
  End Function
  </code></pre>
  
  <p>Can you help me with the logic. Later on in the same module I call this line in a sub:</p>
  
  <pre><code>Dim scrX As Integer = frmMain.pnlDraw.Size.Width
  </code></pre>
  
  <p>And that work perfectly? So I seem to be missing the logic. Help?</p>
  
  <p>Error Details (note this come out of new module, hence I can't use Me.): </p>
  
  <p>System.InvalidOperationException was unhandled
    HResult=-2146233079
    Message=An error occurred creating the form. See Exception.InnerException for details.  The error is: The form referred to itself during construction from a default instance, which led to infinite recursion.  Within the Form's constructor refer to the form using 'Me.'</p>