|
-
Sep 25th, 2003, 01:58 PM
#1
Thread Starter
Member
app close warning
hello,
does any one know which windowsform procedure i need to overrirde to control application exiting? for example, to show an "are u sure u want to exit" dialog.
-
Sep 25th, 2003, 02:47 PM
#2
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If MessageBox.Show("do you want to save your changes before quiting", Me.Name, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
e.Cancel = True
Else
e.Cancel = False
End If
End Sub
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Sep 25th, 2003, 02:48 PM
#3
Sleep mode
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True ' use this in if block
'to cancel exiting your app
End Sub
-
Sep 25th, 2003, 04:50 PM
#4
Thread Starter
Member
works like a charm.. thanks, and welcome back pirate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|