473,406 Members | 2,352 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,406 software developers and data experts.

Catching up closing a form

Hello,

What I want to do is quit simple: if the does clicks on the cross at the
right top of the screen I want to catch this event and check a few things
before closing the window. The only thing is, how can I detect somebody has
clicked on it, and how can I possible prevent the window from closing
without hiding the controlbox?

Does somebody have an idea?

greetz
Jul 17 '05 #1
3 5495
> What I want to do is quit simple: if the does clicks on the cross at the
right top of the screen I want to catch this event and check a few things
before closing the window. The only thing is, how can I detect somebody has clicked on it, and how can I possible prevent the window from closing
without hiding the controlbox?


Check out the Form's QueryUnload event.

Rick - MVP
Jul 17 '05 #2
You did put me on a good road to the answer, its "closing" in vb.net, thx
anyway, by searching in help on queryunload I found it ...

greetz
"Rick Rothstein" <ri************@NOSPAMcomcast.net> schreef in bericht
news:QJ********************@comcast.com...
What I want to do is quit simple: if the does clicks on the cross at the
right top of the screen I want to catch this event and check a few things before closing the window. The only thing is, how can I detect somebody

has
clicked on it, and how can I possible prevent the window from closing
without hiding the controlbox?


Check out the Form's QueryUnload event.

Rick - MVP

Jul 17 '05 #3
For future reference, almost everybody here is using VB6 or lower. While you
may get a stray answer to VB.NET questions here, you should ask them in
newsgroups devoted exclusively to .NET programming. Look for newsgroups with
the word "dotnet" in their name.

For the news.devx.com news server, try these

vb.dotnet.discussion
vb.dotnet.technical

For the microsoft news server, try these newsgroups...

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb

There are some others, but these should get you started.

Rick - MVP


"Wortelvisje" <nb*****@hotmail.com> wrote in message
news:10***************@seven.kulnet.kuleuven.ac.be ...
You did put me on a good road to the answer, its "closing" in vb.net, thx
anyway, by searching in help on queryunload I found it ...

greetz
"Rick Rothstein" <ri************@NOSPAMcomcast.net> schreef in bericht
news:QJ********************@comcast.com...
What I want to do is quit simple: if the does clicks on the cross at the right top of the screen I want to catch this event and check a few things before closing the window. The only thing is, how can I detect
somebody has
clicked on it, and how can I possible prevent the window from closing
without hiding the controlbox?


Check out the Form's QueryUnload event.

Rick - MVP


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here...
3
by: Elp | last post by:
Hi, I've developped a Window Form C# application which main form contains several activex controls. No problems most of the time but on some machine, the application crashes when the main form...
2
by: Silby | last post by:
Hi, I've a form.load event that initializes a cardreader, which is crucial to the operating of the program. Now if that throws an exception, the program needs to give a message and close down....
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
5
by: lord.zoltar | last post by:
How can I prevent the big close button in the top of the window from closing the window? I want to have and "are you sure?" confirmation so the user must press "Yes" before the program ends. Right...
3
by: Anthony P. | last post by:
Hello Everyone, I am writing a Windows Mobile 5.0 application using VS 2..8 in VB.NET. When someone clicks the "Exit" menu option, which generates a button_click() event, I find it easy to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.