473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

vb.net 2003 for closing

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
8 1123
"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
"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
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
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
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
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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: dsnyder | last post by:
This HTML has a bit of Javascript at the end that puts the initial focus on the userID field. It works great on Windows2000 running IE6, but the initial focus never goes to the userID field on...
0
by: Peter Childs | last post by:
Thought this might intrest any Postgres Users in the South East England area. The main talk at this meeting is on Postgres Vs MySql. Peter Childs -------- Original Message -------- Subject:...
6
by: Ryan Muller | last post by:
My company just upgraded from Access 97 to Access 2003 today and we are having some issues in a database that generates a Word document from information selected in a form. Here is the code we...
9
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in...
2
by: harry | last post by:
Hi, After installing VS.2003, I just upgraded a VS.NET 2002 project to VS.NET 2003. I upgraded because VS.NET 2003 is slow and buggy. However, I find VS.NET 2003 is worse in terms of bugs....
0
by: Tym | last post by:
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? ...
6
by: RG | last post by:
Hello – I’m relatively new to VB and I’m not getting how to do Dispose correctly from my readings. I have an application with 3 Forms (with a lot of logic going on within each): Form1,...
1
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.