if (BFS.Application.IsAppRunningByFile("*\\notepad.exe")) { BFS.Window.Minimize(BFS.Application.GetMainWindowByFile("*\\notepad.exe")); }