Solved

?Recognize WindowsNT-Shutdonw via API? (under NT)

Posted on 1998-08-13
4
133 Views
Last Modified: 2010-04-30
I want to recognize the windows shutdown with VB4.0. The Form_Unload does not work because
my programm has a loop in the Form_Load! So I need to recognize the windows-shutdown from somewhere else.
API?
OR: if you know how to palce my loop out of the Form_Load so that it is also startet immediately when running.

swilt wrote:" loop in the Form_Activate and look at UnloadMode in the Form_QueryUnload"
HOW??? Explain???
0
Comment
Question by:lole
  • 2
4 Comments
 
LVL 2

Expert Comment

by:swilt
ID: 1468741
loop in the Form_Activate and look at UnloadMode in the Form_QueryUnload
0
 

Author Comment

by:lole
ID: 1468742
Edited text of question
0
 

Author Comment

by:lole
ID: 1468743
Swilt, pleas give na example that works
0
 
LVL 14

Accepted Solution

by:
waty earned 50 total points
ID: 1468744
The only thing to do is adding a DoEvents in your loop in Form_Load

Sub Form_Load
  Do while True
     ...
     DoEvents
     ...
  Loop
End Sub

Sub Form_UnLoad
  ' *** Quit
End Sub

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now