|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to check running program existed or notHi Everyone,
I have a VB program that automatically running (in minimize), let us call it DataLog.exe when I open my main program. DataLog.exe will to the data logging function and store it in database (Access). My problem is, every day this DataLog.exe is shutdown by unknown causes. Is there anyone know how to check whether DataLog.exe still running (appears in Task Manager) and also prevent user from kill the DataLog.exe from Task Manager? Thanks in advance. Does this application have a visible form? Hide it if you don't want just
anyone to close it. You could also check the UnloadMode parameter in the QueryUnload event of the form. It tells you why the application should close. You could write this parameter to a log file, so if the application has been closed, you know whether the user closed it, whether it was closed from the task manager, etc. And if you don't have a logfile at all, it probably crashed somewhere. Robert Show quoteHide quote "Masriaty" <Masri***@discussions.microsoft.com> wrote in message news:741C8C74-83E8-48D0-AAA2-63DF70306F17@microsoft.com... > Hi Everyone, > > I have a VB program that automatically running (in minimize), let us call it > DataLog.exe when I open my main program. DataLog.exe will to the data logging > function and store it in database (Access). > > My problem is, every day this DataLog.exe is shutdown by unknown causes. > > Is there anyone know how to check whether DataLog.exe still running (appears > in Task Manager) and also prevent user from kill the DataLog.exe from Task > Manager? > > Thanks in advance. Hi Robert,
In Form Unload, we did put a log file when user mannually close the screen. However when user kills the program through task manager, the logfile remains the same - not effected by the action. The only thing we did not put the same function when error occurs. What our plan here is, when user want to kill the program from task manager, system (OS) will alert that user unable to delete it and program continues to run. -Masriaty- Show quoteHide quote "Robert" wrote: > Does this application have a visible form? Hide it if you don't want just > anyone to close it. > > You could also check the UnloadMode parameter in the QueryUnload event of > the form. It tells you why the application should close. You could write > this parameter to a log file, so if the application has been closed, you > know whether the user closed it, whether it was closed from the task > manager, etc. And if you don't have a logfile at all, it probably crashed > somewhere. > > Robert
Other interesting topics
CommandButton!
Using shell command to map drive can't get redirect result to file Modal form stops code in another form INSERT INTO how to split numeric part from letters in string Shrink Wrap SCC API implementation Iterative GetObject get list of file names in a directory Is any device connected to COM1 port |
|||||||||||||||||||||||