kasdoffe Posted March 8, 2005 Posted March 8, 2005 How can I get the handle of the window that was last focused on before my program got focus? And, how can I get that handle while my program is running too? For instance, say I have two MS Word applications running, WORD1 and WORD2. If I click on WORD1, then start my program, I want to get the handle of WORD1. Now, while my program is running and I click on WORD2 and click back to my program, I want the handle of WORD2. Can this be done? I've used the GetForeGroundWindow API in my Main() method of my program to get the last window, but I really need to be able to get it while my program is running too... Quote
kasdoffe Posted March 9, 2005 Author Posted March 9, 2005 I've been thinking about this more and workarounds to my problem. Is there any way to send a command or set a variable in another running process? This may work for me.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.