S Simon Jefferies Apr 13, 2004 #2 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] -
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] -
H Herfried K. Wagner [MVP] Apr 13, 2004 #3 * "=?Utf-8?B?TWF0dA==?= said: I was wondering how I could pass variables between forms? Click to expand... /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.
* "=?Utf-8?B?TWF0dA==?= said: I was wondering how I could pass variables between forms? Click to expand... /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.