Passing Variables

  • Thread starter Thread starter Guest
  • Start date Start date
Hello,

I think you are after ByRef. You can set-up a parameter on the New()
function or another method in the child form, like the example below.

Private m_MyVariable As Object = Nothing

''' pass variable into child form
Public Sub New(ByRef MyVariable As Object)

''' child form has access to same object
m_MyVariable = MyVariable

End Sub

The child form will refer to the same object.

Hope this helps,
Simon Jefferies
Tools Programmer, Headfirst Productions
mailto:[email protected]
-
 
* "=?Utf-8?B?TWF0dA==?= said:
I was wondering how I could pass variables between forms?

/Variables/ or /references/ to objects? The latter can be done by
adding public properties to a form and making a reference to the
instance of the form available to the other form.
 
Back
Top