hexagon logo

VB code/ If a program is running

Does anyone know what code would be used to find out if a program is currently running in PC-Dmis? I wrote some code to automate the execution process and if I use it while a program is running, it closes the program and opens the new program while the original program continues to run. (Not sure for how long though. I stopped it after I tested it.)
Parents
  • You should be able to use the Enabled property of the buttons.

    For example, in the OnStartExecution section you set the button.Enabled property to False and in the OnEndExecution you set it back to True again. You might want to have some sort of error handling too, if something goes wrong it should enable the buttons again, otherwise they might be disabled until you restart your app (if your app crashes during PC-DMIS program execution or PC-DMIS closes during program execution).
Reply
  • You should be able to use the Enabled property of the buttons.

    For example, in the OnStartExecution section you set the button.Enabled property to False and in the OnEndExecution you set it back to True again. You might want to have some sort of error handling too, if something goes wrong it should enable the buttons again, otherwise they might be disabled until you restart your app (if your app crashes during PC-DMIS program execution or PC-DMIS closes during program execution).
Children