-
February 5th, 2011, 07:21 PM
#1
Manipulating controls from another form.
Lets say I have a List Box called listBox1 on Form1 and on Form2 I have a button called Delete. Whenever the user presses the Delete button on Form2 it should delete an entry from listBox1 in Form1. How can I manipulate listBox1 from Form2's Delete button?
-
February 5th, 2011, 10:30 PM
#2
Re: Manipulating controls from another form.
You can use Form1.xxx to access a PUBLIC control
-
February 10th, 2011, 05:20 PM
#3
Re: Manipulating controls from another form.
This depends on what version of VB your using. If you are in fact using VB6 then you can do as stated above For1.Listbox1.item(x).delete
If you are using .net ie VB 2010 express. then you will need to get the handle of the instance of the form. Which you can save to a global variable when you initialize the form.
-
February 10th, 2011, 07:13 PM
#4
Re: Manipulating controls from another form.
Not really, if you have a PUBLIC form
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
|