Computing.Net > Forums > Programming > Control box MIN/MAX buttons

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Control box MIN/MAX buttons

Reply to Message Icon

Name: CJ
Date: October 11, 2002 at 10:39:58 Pacific
OS: Win 2k
CPU/Ram: 1.3G
Comment:

Can someone tell me in VB6 if there is a way that if a user clicks the X or presses AltF4 to close my form make it display an msgbox that asks if they are sure they want to exit. The only way i have around it so far is to make the control box false and force the user to use File then exit on my menu bar and display the message box that way. Any help would be appreciated.

CJ



Sponsored Link
Ads by Google

Response Number 1
Name: Manish
Date: October 11, 2002 at 11:00:47 Pacific
Reply:

you can write the following piece of code in query unload event of your form

Dim response As String
response = MsgBox("Do you really want to quit?", vbYesNo, "MyVBProgram")
If response = vbYes Then
Unload Me
Else
End If

actually this is hald done ... its giving the message and asking for the response but when the user clicks no, then also it shuts down. if you could find the remedy for it then plz reply back either to my mail or this thread.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Control box MIN/MAX buttons

vc++: edit box exceeding max amount www.computing.net/answers/programming/vc-edit-box-exceeding-max-amount/4087.html

Min, Max and Close buttons www.computing.net/answers/programming/min-max-and-close-buttons/5793.html

'Whats this Help' in vB www.computing.net/answers/programming/whats-this-help-in-vb/854.html