View previous topic :: View next topic |
Author |
Message |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Sun Nov 18, 2007 8:28 am Post subject: VB6 hide/close help |
|
|
How do you make it so when the user presses the x in the top right corner, it hides instead of closes?
Thanks _________________
|
|
Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Sun Nov 18, 2007 8:33 am Post subject: |
|
|
You can't. |
|
Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Sun Nov 18, 2007 8:38 am Post subject: |
|
|
You sure?
Then dang -.-
Or maybe there's a way when it's unloading, you set it to hide
I tried it with query unload but it doesn't work if I add form.hide _________________
|
|
Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Sun Nov 18, 2007 8:44 am Post subject: |
|
|
Add another form, then use this code
Code: |
Private Sub Form_Load()
Load Form2
Form2.Hide
End Sub
|
When you close form1, form2 won't close. |
|
Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Sun Nov 18, 2007 8:50 am Post subject: |
|
|
Not really what I'm looking for
Found solution
Code: | Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then
Form.hide
End If
End Sub |
That should be it _________________
|
|
Back to top |
|
 |
|