7
Answers

openFileDialog to brows a folder if a program is running

Ask a question
Hind Najim

Hind Najim

11y
1.6k
1

Hi

Using openFileDialog, would like to set a condition to check if a specific program is running or not. if it's running, then openFileDialog will set the initial directory to a specific folder for that program, otherwise it will go to another directory, else it will open the C: directory

Example:

If Windows media player is running then openFileDialog will open/set the directory of C>>Users>>username>>My Music folder
if Windows media player is not running, it will set/open My documents
else it will open the C: Directory


Answers (7)