| View previous topic :: View next topic |
| Author |
Message |
Blasph Master Cheater
Reputation: 0
Joined: 21 Feb 2007 Posts: 275
|
Posted: Sun Jan 13, 2008 11:04 am Post subject: VB opening a new form and closing another |
|
|
To open a new form Im using this code
| Code: | Private Sub Command1_Click()
Form2.Show
End Sub |
How I close form 1 when I open this?
Something like Form1.close?
Edit Im using VB6
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Sun Jan 13, 2008 11:15 am Post subject: |
|
|
Unload Me or Unload Form1
_________________
|
|
| Back to top |
|
 |
Blasph Master Cheater
Reputation: 0
Joined: 21 Feb 2007 Posts: 275
|
Posted: Sun Jan 13, 2008 11:22 am Post subject: |
|
|
| Blader wrote: | | Unload Me or Unload Form1 |
Thanks
|
|
| Back to top |
|
 |
sangeli Master Cheater
Reputation: 0
Joined: 07 Dec 2006 Posts: 406
|
Posted: Sun Jan 13, 2008 11:56 am Post subject: |
|
|
well, you can do unload, but u can also do form1.hide if you want to use the form later. Unload literally closes the form, .hide just hides it. Your call.
_________________
| Dark Byte wrote: | | ce can certainly damage hardware let's say you have a robotarm attached to your computer, and the software limits usually block it from ripping out it's own cpu. If you remove that limit and then issue the command to rip out the cpu, sure, say goodbye to your hardware |
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Sun Jan 13, 2008 12:10 pm Post subject: |
|
|
| Code: | Private Sub Command1_Click()
Form2.Show
End Sub | well theres many ways you can do that like.... | Code: | Private Sub Command1_Click()
Form2.Show
Form1.Visible = False
End Sub |
or like blader said
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Jan 13, 2008 5:11 pm Post subject: |
|
|
Also remember when you hide the form, or set it's visibility to false (same thing) you are not unloading it from memory! Be sure to unload your objects when you are done with them or you will run into memory leaks.
_________________
- Retired. |
|
| Back to top |
|
 |
|