Assume that notepad.exe is opening and the it’s window is inactive. I will write an application to activate it. How to make?
Update: The window title is undefined. So, I don’t like to use to FindWindow which based on window’s title.
My application is Winform C# 2.0. Thanks.
You’ll need to P/Invoke
SetForegroundWindow().Process.MainWindowHandlecan give you the handle you’ll need. For example:Note the ambiguity, if you’ve got more than one copy of Notepad running.