borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Dockable Windows? (I think))Next Topic (How to create a file selection dialog) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Stopping a form unload.
Poster Message
mnemoo
Level: Protégé

Registered: 19-05-2002
Posts: 7

icon Stopping a form unload.  Archived to Disk

Is there a way to recover from a user pressing the 'close' button.. ie the top right X button, to unload a form or exit a program?? I can use the form.unload to trap the event but can't seem to stop the event happening anyway. Any clues?

30-05-2002 at 06:36 AM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Stopping a form unload.  Archived to Disk

Although the following will make it so not even you can unload the form with code, so you'll have to modifiy it to unload if done via code (if...then...endif).


Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Cancel = 1
End Sub

30-05-2002 at 06:02 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : Stopping a form unload.
Previous Topic (Dockable Windows? (I think))Next Topic (How to create a file selection dialog) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder