944,035 Members | Top Members by Rank

Ad:
Nov 5th, 2009
0

simple question (Form1)

Expand Post »
Hey,

How not let the user to close a form with a close button? Basically, I need a form to be hidden most of the time, but sometimes it is shown by the code (intentionally). And when you hit close button, user not only closes the form, but unloads it as well, so how do I avoid that?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
deftones is offline Offline
27 posts
since Jul 2008
Nov 6th, 2009
0
Re: simple question (Form1)
Use the query_unload event, set cancel to true and hide the form with me.hide or me.visible=false



Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Nov 6th, 2009
0
Re: simple question (Form1)
Very clear and short, thank you
Reputation Points: 10
Solved Threads: 0
Light Poster
deftones is offline Offline
27 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: vb6 populating with first record information
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Avoiding code troubles





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC