
How do you pass from obj from one form to a module/forms
Hi,
In VB.NET you can achieve the desired result by passing an instance of a
form to a module and setting the forms properties or accessing forms
controls from it.
Following code will make things clear
Form1 with TextBox1, Button1
Quote:
>>Set TextBox1 Modifiers property to "Public"
In button click
>>SetFormText(Me)
In Module
Sub SetFormTextBox(ByRef o As Object)
o.TextBox1.Text = "From Module"
End Sub
This code will change the value of textbox1.text property of the passed form
to "From Module"
Hope this helps you.
Regards,
Manish Mehta
http://www.dotneteXtreme.com
Quote:
> In VB6 you were able to pass an obj from one form and give it a value in a
> module and/or other form
> in VB 6 the code was form1.textbox.text = form2.textbox4.text
> Now How do you do this in VB.Net
> Thanks