|
-
Aug 24th, 2000, 08:53 AM
#1
Thread Starter
Lively Member
When I click a command button, I want it to open up a new form. Code for that?And how do I make sure the second(3rd, 4th) form doesn't open up when you start the program? I could really use help becuase I am stuck in a program I am making. So, thanx anybody.
[Edited by andymannewbie on 08-24-2000 at 10:04 AM]
-
Aug 24th, 2000, 09:08 AM
#2
Member
the proptery for form is:
form1.show ' shows form 1
form2.show ' shows form 2
form1.hide ' hides form 1
form2.hide ' hides form 2
unload form1 ' unloads form 1
unload form2 ' unloads form 2!
so to show form 1 when button1 is clicked:
private sub command1_click()
form1.show
end sub
so to hide form 1 when button1 is clicked:
private sub command1_click()
form1.hide
end sub
Thanx, for your reply(s)
Zhang Tian Hao
Visual Studio Enterprise 6.0 SP 4
[email protected]
-
Aug 24th, 2000, 09:10 AM
#3
Lively Member
I totally feel your pain about being new to VB. I just started myself, but I can tell you what I know!!
It's real easy to open a form. Say you want to do it under a button on form1 to open form2
=-=-=-=-=-=
Private Sub Command1_Click()
form2.show
End Sub
And to answer your other question, check your Modules, and make sure that there is nothing there that is opening up your other forms. It sounds to me that there is. Hope I helped!
~Brian
-
Aug 24th, 2000, 10:29 AM
#4
When you start your program, only the StartUp object is loaded so you don't need to worry about 2nd, 3rd, 4th etc. Forms loading.
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
|