Visual Basic Explorer
Visual Basic Explorer
 Navigation
 Home


 Coding
 Source Code

 FAQ Center

 VB Tips

 Downloads

 ToolBox

 Tutorials

 VB Games

 VB News

 VB Award

 VB Forums



 Affiliates
 Planet Source Code

 Rent a Coder

 DirectX4VB


 Misc
 Search

 Feedback

 Advertise

 About


Need to hire
a VB coder?

Please support our sponsor:

 Home 
 Site Map 
 Forums 
 News 
 Feedback 

 

'Triggering Buttons between Forms

 
Q. I`m trying to write some code where clicking a radio button on form #1 makes
a command button visible on form #2. I know how to do this within one form, but
I don`t know how to do this with two forms.

 
A. This is an easy one. You just have to include Form2`s name in front of the
button`s name. Example:

 
1.)Create two forms(Form1 and Form2)
2.)On Form1 place two option buttons(Option1 and Option2)
3.)On Form2 place one command button(Command1)

 
'code for Form1
Private Sub Form_Load()
Form2.Show 'Show Form2 along w/Form1
End Sub

 
Private Sub Option1_Click
Form2.Command1.visible = True 'Show button. See?
End Sub

 
Private Sub Option2_Click
Form2.Command1.Visible = False 'Hide button.
End Sub

 
Thanks to: Dan


Downloads

In IE right-click and select 'Save Target As...' or in Netscape right-click and select 'Save Link As...'

 

View Plain Text View Plain Text
Download Demo Project Not Available
View Code Online Not Available





Home | About | What's New | Source Code | FAQ | Tips & Tricks | Downloads | ToolBox | Tutorials | Game Programming | VB Award | Search | VB Forums | Feedback | VBNews | Copyright & Disclaimer | Advertise | Privacy Policy |

Quick searches: Site Search | Advanced Site Search 

Copyright 2002 by Exhedra Solutions, Inc.
By using this site you agree to its terms and conditions
VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc.