473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running code when access shut down with cross

My application runs some temporary file clean up code as an onClick event
when users click the exit button. My problem is that some users don't exit
properly and simply click the cross on the top right corner of the window it
is running in.

Can I run the code somehow when that happens? If so, how?

TIA
dixie
Jun 15 '06 #1
5 2019
"Dixie" <di***@dogmail. com> wrote in
news:12******** *****@corp.supe rnews.com:
My application runs some temporary file clean up code as an
onClick event when users click the exit button. My problem is
that some users don't exit properly and simply click the cross
on the top right corner of the window it is running in.

Can I run the code somehow when that happens? If so, how?

TIA
dixie

move the code from the On Click event of the button to the on Close
event of the form containing that button.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 15 '06 #2
Does this mean that Access automatically closes forms before it exits?

It is quite possible that the particular form would have its visible
attribute set at false, does that matter?

dixie

"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:Xn******** **************@ 66.150.105.47.. .
"Dixie" <di***@dogmail. com> wrote in
news:12******** *****@corp.supe rnews.com:
My application runs some temporary file clean up code as an
onClick event when users click the exit button. My problem is
that some users don't exit properly and simply click the cross
on the top right corner of the window it is running in.

Can I run the code somehow when that happens? If so, how?

TIA
dixie

move the code from the On Click event of the button to the on Close
event of the form containing that button.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 16 '06 #3
Access closes all forms before it closes, visible or not.
Jun 16 '06 #4
Great, then that's perfect, as this form is always open, but often
invisible. Problem solved. Thankyou both.

dixie

<w_a_n_n_a_l_ l_ -@-_s_b_c_g_l_o_b_ a_l._n_e_t> wrote in message
news:kc******** ***********@new ssvr27.news.pro digy.net...
Access closes all forms before it closes, visible or not.

Jun 16 '06 #5
"Dixie" <di***@dogmail. com> wrote in
news:12******** *****@corp.supe rnews.com:
Does this mean that Access automatically closes forms before
it exits?
Yes!
It is quite possible that the particular form would have its
visible attribute set at false, does that matter?
Not in the least. I often use a "Welcome" form as a splash
screen, and hide it after 5 seconds. It contains clean-up code
as well as the set-up code.

dixie

"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:Xn******** **************@ 66.150.105.47.. .
"Dixie" <di***@dogmail. com> wrote in
news:12******** *****@corp.supe rnews.com:
My application runs some temporary file clean up code as an
onClick event when users click the exit button. My problem
is that some users don't exit properly and simply click the
cross on the top right corner of the window it is running
in.

Can I run the code somehow when that happens? If so, how?

TIA
dixie

move the code from the On Click event of the button to the on
Close event of the form containing that button.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com



--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 16 '06 #6

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

Similar topics

8
2755
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think this would be simple enough if the ASP didn't have any user input, but it does.
1
1500
by: Rocky A | last post by:
I need to open an excel workbook and import info to my access program. That isn't the problem, I've got the code down for doing what I want to do. I'm declaring the variable and setting it like this. Dim objEx As Object Set objEx = CreateObject("Excel.Application") My problem is after I'm done and exit the access code module and I shut...
0
1511
by: Mr Bounce | last post by:
Hi, Probably well worn ground, this, but im stumped and need some help, if you could: I'm trying to write some code for a windows service that needs to run in the background polling a server for commands. Certain commands require the service to interact with the application running on the active desktop, currently just to either shut it...
3
3472
by: kuldeep | last post by:
Hi all, I have a application developed in C# .net. The problem I face is I am unable to shutdown my machine when the exe is running. Windows is unable to close this exe an shut down. Can anyone help. Regards, Kuldeep Pawar
4
1875
by: andersboth | last post by:
I want to run some code when my Windows Form Application is being shut down. I want to run this code when the Application is being shut down in the following situation: 1. The App is being shut down by the user. 2. The App is being shut down because of Windows System Shut Down. 3. The App Process is being killed in Task Manager
1
1113
by: | last post by:
Hello, i have a question, i have made an .exe file in vb.net and this exe file is running the whole time, while you work with the computer. but then when i want to shut down the computer, the process is still there...... so i have to click two or more times on shut down ..... how can i make this, that the programm shut down on the first...
3
5929
by: Rune Jacobsen | last post by:
Hey all, Maybe someone knows this problem; I have a C# WinForms app that every now and then has a new version that I deploy to my users using an installation script written with the NSIS installer. To improve on this, I want the installer to shut down any running instances of my application when it does the installation. To do this, I...
5
3711
by: Simon Hart | last post by:
Does anyone know the standard code access permission to be able to manipulate a process using the Process class? Thanks Simon.
3
1581
by: Jeremy C B Nicoll | last post by:
Is there a cross-platform of determining what other processes (or in Windows terms, other applications) are running? Is it possible in a cross-platform way to ask some other application to shut down, wait a while, and then test to see if it did shut? Failing that are there separate Windows, Mac and Linux/Unix ways of doing this? --
0
7697
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.