LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to close the program automaticly when quit windowXP?

Hello,

my labwindows program is running in background without interface, and when I quit the windowsXP,it will be a popup window which let you end your program forcely.

how can let my program is closed automaticly when windowsxp quit ,no any popup window?

0 Kudos
Message 1 of 5
(3,821 Views)

Tanggio:

 

There are a couple of methods in an older thread here: http://forums.ni.com/ni/board/message?board.id=180&message.id=16984

 

It looks like your chance for success depends on your version of CVI and of Windows. 

0 Kudos
Message 2 of 5
(3,814 Views)

things have drastically changed since those ancient times...

 

there is now a EVENT_END_TASK event which is sent to the main callback function to signal that windows want to exit. have a look at the documentation for InstallMainCallback() for how to create a main callback, then in the callback process the EVENT_END_TASK event and quit your application, by calling QuitUserInterface() for example. also have a look at the documentation for EVENT_END_TASK, which details the content of event data.

0 Kudos
Message 3 of 5
(3,802 Views)

EVENT_END_TASK is one of the methods shown in the older post, with the added bonus of learning a new phrase in Czech.  I always like to know when there is more than one way of doing things.

 

But "ancient times"?  Ouch!

0 Kudos
Message 4 of 5
(3,789 Views)

ooops, sorry. i overlooked the thread and did not see the EVENT_END_TASK tree in the WM_QUERYENDSESSION forest. also, i thought that support for this event was added with CVI 8.

 

and yes, for me 2005 is ancient times: CVI was still 7. at the speed computers and softwares evolve, it will soon be considered prehistory. 

0 Kudos
Message 5 of 5
(3,778 Views)