How to get application focus?
-
I have a simple dialog application. I wanna be able to run the application few times, but automatically the new dialog (application) sits on top of the previous. Is there anything I can do or set to make the new application hide behind the previous existing one instead?
-
I have a simple dialog application. I wanna be able to run the application few times, but automatically the new dialog (application) sits on top of the previous. Is there anything I can do or set to make the new application hide behind the previous existing one instead?
Hi, You can find the window handle of the previous instance then when you execute your second instance call the SetWindowPos Function[^] and assign HWND_BOTTOM. If all of the dialog windows are children/siblings you may want to use the DeferWindowPos Function[^] instead. Best Wishes, -David Delaune
-
I have a simple dialog application. I wanna be able to run the application few times, but automatically the new dialog (application) sits on top of the previous. Is there anything I can do or set to make the new application hide behind the previous existing one instead?
Wouldn't it make more sense to just limit it to a single instance?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
I have a simple dialog application. I wanna be able to run the application few times, but automatically the new dialog (application) sits on top of the previous. Is there anything I can do or set to make the new application hide behind the previous existing one instead?