-
Processes and Focus
I am calling Process.Start(filename) to start a process. Now the file I am launching is a file that has been associated with an application (AppX). The file contains command line arguments for AppX, so when the file is executed it launches AppX with the provided command line arguments stored in the file.
AppX is passed an argument via the command line to run minimized, which it does, but the problem arises when AppX displays a message box. AppX does NOT have focus, so when I try to interact with the application it won't let me unless I start using ALT+TAB to change application focus.
Any ideas here?
-
Re: Processes and Focus
Do you know when these messageboxes occur? You can find the handle of the messagebox using the FindWindow API with the class name and title of the window, then FindWindowEX (i think) to get child windows in order to find the handle to the control you need to "click" and click it through API using SendMessage... just throwing out ideas...