Hind Najim

Hind Najim

  • NA
  • 32
  • 18.2k

openFileDialog to brows a folder if a program is running

Sep 6 2013 4:53 AM

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)