Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing Objects on a different Form in VB .Net

Status
Not open for further replies.

KisiOne

Programmer
Sep 6, 2003
6
AU
Hi,
in VB6 can reference Form1.control.text from Form2. How does one achieve the same thing in VB .Net?
PK
 
The same way except VB.Net does not have a default object variable for each form. In VB6, every form has a hidden object variable defined as
Public formname as New formname
The "new" is delayed until the first reference to the variable.
In VB/Net, you could try defining an object variable for every form in a Public Module.

Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top