NewBie .. how to use object of the other form
Dear The Expert,
With VB6 .. We can use / get the value of object from other form.. (eg. I want to get the value of textbox.text on Form1, I use Form1.Textbox1.Text) .. how about in VB.NET? .. I need to use the sqldataadapter object on Form1 .. how to do this...? please advice .. thank you
Regards
Winanjaya
Re: NewBie .. how to use object of the other form
Quote:
Originally posted by Winanjaya
Dear The Expert,
With VB6 .. We can use / get the value of object from other form.. (eg. I want to get the value of textbox.text on Form1, I use Form1.Textbox1.Text) .. how about in VB.NET? ..
Regards
Winanjaya
Several ways. Have a search of this forum for several posts.
Easiest is in a module:
Public frm1 as New Form1
Public Sub Main
Application.run(frm1)
In Form1
Dim frm2 as New Form2
You can then access any object or method of Form1 by prefacing your code for example.
frm1.TextBox1