|
-
Dec 28th, 2011, 06:17 PM
#1
Thread Starter
Member
Calling A button part 2
I've figured out how to change a button from invisible to visible by btnWhatever.Visible = True, after clicking on the button.
This only works if both buttons are in the same Class. I want the first button in class 1 to trigger the code above and allow the button in class 2 to now be visible.
I've tried playing with the public/private indicator of each button but that doesn't seem to be working. Can a button in one class trigger an event for a button in another class, so that it can become visible?
-
Dec 30th, 2011, 01:11 AM
#2
Re: Calling A button part 2
In your class modules you'll need to specify where your buttons are located. For example if you have Button1 and Button2 in Form1, you can work with one button in one class and have Form1.Button1.Visible = False, and Form1.Button2.Visible = False in another class. I wouldn't necessarily consider them events, but more like modifying the properties to the buttons. Triggering events are possible with different classes/modules but personally I use functions / subs rather than trigger what code is within my events to my objects.
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
|