|
-
Apr 4th, 2007, 02:10 AM
#1
Thread Starter
Lively Member
[RESOLVED] [2005] Form Instances
Hi,
Coming from VB6 and eVb, I wrote a program without creating a new instance of each form before I used them (I simply used form1.show). But in realizing the utility of creating instances of forms first, I am changing my program now to do that (ie. dim f_form1 as new form1... f_form1.show).
My question is: When I am manipulating controls, assigning values, etc., when do I use the class name (form1) and when do I use the instance name (f_form1)??? It seems that I can do either, but I'm sure there is a "correct" way to do it, and any advice will be greatly appreicated!
My assumption is that if I set
Code:
form1.label1.text = "a"
then this will change label1.text for all instances of this form...
and if I set
Code:
f_form1.label1.text = "a"
it will only change label1.text for that particular instance.
Am on the right track here?
Thank you,
Corey
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
|