How would I get a form to appear in VB?

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2008
Posts: 2
Reputation: shotgunjoe is an unknown quantity at this point 
Solved Threads: 0
shotgunjoe shotgunjoe is offline Offline
Newbie Poster

How would I get a form to appear in VB?

 
0
  #1
Feb 8th, 2008
I know this seems like a very noobish question and has probably been asked many times before, I'm trying to write a lottery program in which the numbers are generated, then you can check your numbers. There is a command button on the first form which says "Check Numbers" and this would take you onto the second form. Can anyone help me by telling me how to bring this up by clicking the command button? Thanks.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 570
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: How would I get a form to appear in VB?

 
0
  #2
Feb 8th, 2008
type this code in your command button click event:

Form2.Show
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 57
Reputation: werks is an unknown quantity at this point 
Solved Threads: 1
werks's Avatar
werks werks is offline Offline
Junior Poster in Training

Re: How would I get a form to appear in VB?

 
0
  #3
Feb 8th, 2008
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command1_Click()
  2. Form2.Show
  3. End Sub

If you press the Command1 button it will automatically show the another form..
Kenneth
"Better Than Yesterday"
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 2
Reputation: shotgunjoe is an unknown quantity at this point 
Solved Threads: 0
shotgunjoe shotgunjoe is offline Offline
Newbie Poster

Re: How would I get a form to appear in VB?

 
0
  #4
Feb 8th, 2008
Great guys, thanks a lot! I appreciate it!
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 16
Reputation: K-Dave is an unknown quantity at this point 
Solved Threads: 1
K-Dave K-Dave is offline Offline
Newbie Poster

Re: How would I get a form to appear in VB?

 
0
  #5
Mar 20th, 2008
To do what you want do the following
Private Sub Command1_Click()
Form2.Show
End Sub
NB: if you have given your second form a name write that name instead of form2
Hope i've helped.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 566 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC