|
-
Apr 4th, 2003, 12:27 PM
#1
Thread Starter
Registered User
Control Reference
How do I reference controls on other forms in VB .NET? In VB 6.0, you could just say form.control and then you could access that forms controls. The only way I can figure out how to do this is to declare an object as that form but then I need to be able to set the object to a instance of the form if the form is loaded. Any ideas on how to handle any of this?
-
Apr 4th, 2003, 12:42 PM
#2
Sleep mode
for example :
Dim frm2 as new form2
frm2.Textbox1.Text
Is this what you mean ?
-
Apr 4th, 2003, 01:00 PM
#3
Thread Starter
Registered User
yes but how do I force that form variable to reference an already loaded instance of the form or does that not matter (i.e. will it automatically pickup a reference to the loaded form)?
-
Apr 4th, 2003, 01:03 PM
#4
Sleep mode
Try to declare that in second form constructor (I think it should works) or put the variables in modal like this :
Dim frm2 as new form2
-
Apr 4th, 2003, 02:42 PM
#5
PowerPoster
Here, read this. Should answer the question pretty well.
http://msdn.microsoft.com/library/de...adingtonet.asp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|