Click to See Complete Forum and Search --> : Form close
Sigal Laniado
November 17th, 1999, 05:04 AM
I want to hide my form when the user press the close icon in the right top corner of the form ?
I don't want to unload the form! is there any way to do it?
visual fzz
November 17th, 1999, 05:49 AM
You can, on the unload event, put the 'cancel' variable to 1 and do me.hide:
private sub Form1_unload (cancel as integer)
if not close then
'close is your regular way to close the form (I hope there is one : button click,etc...)
cancel=1
me.hide
end if
end sub
Zion
November 17th, 1999, 05:50 AM
I only know one way to do this (but I'm a beginner also!).
example:
Private Sub Form_Load()
STARTPAGE.Visible = False
2NDPAGE.Visible = True
This is a very easy way to do it and I don't know if there's another (better) way. This action will first call for the start page, hide it without the knowledge of the user and shows the second page. If you now close the second page the first page will still remain in the memory.
have fun.
Zion
Sanjeeev
November 17th, 1999, 04:19 PM
here you can do ..
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'Cancel = True
Me.Hide
End Sub
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.