Just ran into an issue with VB.net after years in VB6. I'm attempting to pass a form to a public sub without success.

This worked in vb6
vb Code:
  1. Public Sub MySub(frm As Form)
  2.  
  3. MsgBox (Val(frm.Text1.Text) + Val(frm.Text2.Text))
  4.  
  5. End Function

But when I attempt to do the same in .net i get an error with the below saying Text1 and Text2 are not members of System.Windows.Forms.Form.
vb Code:
  1. Public Sub MySub(ByRef frm As System.Windows.Forms.Form)
  2.        
  3.         MessageBox.Show(Val(frm.Text1.Text) + Val(frm.Text2.Text))
  4.        
  5.     End Sub


Any idea's?