|
-
Oct 18th, 2000, 11:22 PM
#1
Thread Starter
New Member
i am a awfull newbie, in need of help. I am doing some tutorials and learning fast. However on my current project in VB 6.0, i dont know how to simply get another form to show after clicking a command button. What code snippet needs to be in the command button to show another form and close the original form or hide the original after command button clicked.
Thanks in advance. i am also looking for a teacher if anyone has some free time to help me learn? i really could use the help getting started.
-
Oct 18th, 2000, 11:55 PM
#2
Addicted Member
This will go in the button on your first form, it assumes your second frm is called Form2.
Code:
Private Sub Command1_Click()
Me.Hide
Form2.Show
End Sub
Because this code goes in the button click event of a button on Form1, the "Me." means "Form1.", that is, Me refers to the current form, Form1 in this case.
if you didn't want to just hide Form1, but wanted to unload it, the code would be:
Code:
Private Sub Command1_Click()
Unload Me
Form2.Show
End Sub
-
Oct 19th, 2000, 12:13 AM
#3
Thread Starter
New Member
Thanks
That worked. thank you a bunch. i like the unload better then just the hiding. After the user clicks the comand button the first form is really no longer needed. i was curious how to tell it to get lost and play in the traffic, lol
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
|