Solved

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

Posted on 1998-08-13
4
131 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

705 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

19 Experts available now in Live!

Get 1:1 Help Now