By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

vb.net 2003 for closing

P: n/a
Tym
Hi all,

I know this is probably very basic - bt I;ve never had cause to use
this so...

In a main form (MDI) how do I trap for the form closing with a "do you
want to quit y/n" dialogue box?

If they click no, I want to abort the form closing

advTHANKSance

Nov 21 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"Tym" <bi********@microsoft.com> schrieb:

Don't use a fake mail address!!!
In a main form (MDI) how do I trap for the form closing with a "do you
want to quit y/n" dialogue box?

If they click no, I want to abort the form closing


\\\
Private Sub Form1_Closing( _
ByVal sender As Object, _
ByVal e As CancelEventArgs _
) Handles MyBase.Closing
If _
MsgBox( _
"Really close?", _
MsgBoxStyle.YesNo Or MsgBoxStyle.Question _
) = MsgBoxResult.No _
Then
e.Cancel = True
End If
End Sub
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

P: n/a
"Tym" <bi********@microsoft.com> schrieb:

Don't use a fake mail address!!!
In a main form (MDI) how do I trap for the form closing with a "do you
want to quit y/n" dialogue box?

If they click no, I want to abort the form closing


\\\
Private Sub Form1_Closing( _
ByVal sender As Object, _
ByVal e As CancelEventArgs _
) Handles MyBase.Closing
If _
MsgBox( _
"Really close?", _
MsgBoxStyle.YesNo Or MsgBoxStyle.Question _
) = MsgBoxResult.No _
Then
e.Cancel = True
End If
End Sub
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3

P: n/a
Tym
On Thu, 11 Nov 2004 14:21:52 +0100, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
Don't use a fake mail address!!!


It's not - just isn't mine!!

When I started using the groups a few months back, I got bombarded
with 2500 emails over 1 weekend, all to the "spamtrap" email address
used in my messages.

Never again....
Nov 21 '05 #4

P: n/a
Tym
On Thu, 11 Nov 2004 14:21:52 +0100, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
Don't use a fake mail address!!!


It's not - just isn't mine!!

When I started using the groups a few months back, I got bombarded
with 2500 emails over 1 weekend, all to the "spamtrap" email address
used in my messages.

Never again....
Nov 21 '05 #5

P: n/a
Tym
On Thu, 11 Nov 2004 14:21:52 +0100, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"Tym" <bi********@microsoft.com> schrieb:

Don't use a fake mail address!!!


:-)
In a main form (MDI) how do I trap for the form closing with a "do you
want to quit y/n" dialogue box?

Thanks
Nov 21 '05 #6

P: n/a
Tym
On Thu, 11 Nov 2004 14:21:52 +0100, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"Tym" <bi********@microsoft.com> schrieb:

Don't use a fake mail address!!!


:-)
In a main form (MDI) how do I trap for the form closing with a "do you
want to quit y/n" dialogue box?

Thanks
Nov 21 '05 #7

P: n/a
"Tym" <bi********@microsoft.com> schrieb:
Don't use a fake mail address!!!


It's not - just isn't mine!!

When I started using the groups a few months back, I got bombarded
with 2500 emails over 1 weekend, all to the "spamtrap" email address
used in my messages.

Never again....


Is that a valid reason for using someone else's email address (I didn't
check if the mail address exists)? I suggest to always post with a working
email address which is not your primiary address. This will give you a
chance to remove posts you made sooner or later from the Google Groups
archive, for example.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #8

P: n/a
"Tym" <bi********@microsoft.com> schrieb:
Don't use a fake mail address!!!


It's not - just isn't mine!!

When I started using the groups a few months back, I got bombarded
with 2500 emails over 1 weekend, all to the "spamtrap" email address
used in my messages.

Never again....


Is that a valid reason for using someone else's email address (I didn't
check if the mail address exists)? I suggest to always post with a working
email address which is not your primiary address. This will give you a
chance to remove posts you made sooner or later from the Google Groups
archive, for example.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.