|
-
Aug 2nd, 2002, 02:42 PM
#1
Thread Starter
New Member
Access Form Controls from other class
Hi all:
I Have 2 controls in Form1 (TextBox1 and Button1).
TextBox1.Text = "111"
Then I have a class (myClass.vb) that inherits Form1
This class as a:
Sub ChangeText()
dim objForm1 as New Form1
objForm1.TextBox1.Text = "222"
End Text
When I click on Button1 i want to go to the ChangeText() in the other class and change TextBox1.Text
Function Button1_Click
dim objmyClass as New myClass
objmyClass.ChangeText()
End Function
But it doesn't work ..
How can I change TextBox1 properties or other Control properties that are in Form1.vb from a Function that is in myClass.vb?
Thanx in advance.
B.
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
|