|
-
Feb 20th, 2005, 05:04 AM
#1
Thread Starter
New Member
switching forms
I m new to visual basic and am taking a class I m trying to switch forms in a document there are 6 forms and i want to change to the other form by clicking a button i used the open command but it tells me that the form is already open when i run the programm is there anything i can do.
-
Feb 20th, 2005, 05:26 AM
#2
Addicted Member
Re: switching forms
IS the form realy open then?
If yes, you can add so it give not an error.
-
Feb 20th, 2005, 05:34 AM
#3
Thread Starter
New Member
Re: switching forms
its all the same project like they are in a list form1 form2 all in the same project and when i run it only the first form pops up and i want to make it so i can open and close the other forms.
-
Feb 20th, 2005, 05:36 AM
#4
Addicted Member
Re: switching forms
Very easy.
Put this in a button or what:
And you'll see that Form2 will show.
-
Feb 20th, 2005, 05:41 AM
#5
Thread Starter
New Member
Re: switching forms
thanks
-
Feb 20th, 2005, 05:42 AM
#6
Addicted Member
Re: switching forms
np
-
Feb 20th, 2005, 03:51 PM
#7
Re: switching forms
modal won't let you open any other forms until you close the modal one. make sure that is what you want to do.
-
Feb 20th, 2005, 05:12 PM
#8
Addicted Member
Re: switching forms
ooh, I didn't know that
-
Feb 20th, 2005, 07:34 PM
#9
Re: switching forms
Now you do. Anything else?
-
Feb 20th, 2005, 07:54 PM
#10
Addicted Member
Re: switching forms
I don't............maybe altrods?
-
Feb 20th, 2005, 08:01 PM
#11
Re: switching forms
I don't understand.
-
Apr 19th, 2005, 05:57 PM
#12
Hyperactive Member
Re: switching forms
 Originally Posted by altrods
I m new to visual basic and am taking a class I m trying to switch forms in a document there are 6 forms and i want to change to the other form by clicking a button i used the open command but it tells me that the form is already open when i run the programm is there anything i can do.
Try this buddy!
VB Code:
Private Sub Command1_Click()
Form1.Hide
Form2.Show
End Sub
I was just trying to figure that out myself so I thought I would pass it on to you! Let me know how it works!
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
|