09-17-2009 08:25 PM
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?
09-17-2009 10:22 PM
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.
09-18-2009 02:51 AM
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.
09-18-2009 07:55 AM
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!
09-18-2009 10:20 AM
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.