|
-
Oct 12th, 2002, 12:22 PM
#1
Thread Starter
Addicted Member
Close a form through code?
Is there a way to close a form through code? I have 5 forms named form1, form2, etc. And I need to close one of them the way you would by clicking on the X, but through code.
Thanks
-
Oct 12th, 2002, 12:36 PM
#2
Fanatic Member
Re: Close a form through code?
Originally posted by Dude1
Is there a way to close a form through code? I have 5 forms named form1, form2, etc. And I need to close one of them the way you would by clicking on the X, but through code.
Thanks
well i think i understand you, if not say so, but you go to that form, add a button to it, name it command1, then open the code for that button, and put in between Private Sub Command1_Click() and End Sub put this : Unload Form1.exe (im not sure if the .exe is right, hope fully someone else will post.)
-
Oct 12th, 2002, 12:44 PM
#3
Not NoteMe
VB Code:
Unload Form1 'this closes the form 'Form1'
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Oct 12th, 2002, 12:52 PM
#4
Thread Starter
Addicted Member
Yeh, Unload Form1 works, too bad it didn't solve my real problem. I have a few levels in my game and I made them like subs: Level1, Level2, Level3, etc. Then I have a form on which there are command buttons. So if I click on Button1 then Form1.Level1, Button2 then Form1.Level2. But the problem is that when I finish one level, the second level doesn't reset the positions of objects, even though I say them again.
-
Oct 12th, 2002, 03:16 PM
#5
Not NoteMe
I'm not too sure what you mean, could you re-phrase what you're trying to do?
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Oct 12th, 2002, 04:32 PM
#6
Thread Starter
Addicted Member
Never mind, I got it to work!
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
|