Windows 7
(1)
Vista
(1)
Word
(1)
XP
(1)
AllowSetForegroundWindow
(1)
SwitchToThisWindow
(1)
BringWindowToTop
(1)
SetForegroundWindow
(1)

Put Foreground window of .Net Window and Word windows

Asked By TobyG
17-Nov-09 12:49 PM
Hello,

i want to put a .Net Window or an automated Word Window to front for user
action.

It should work with XP, Vista and Windows 7

But my API methods do not worked, only sometimes.
The behaviour changes if i have one foreground window or no open window.
Sometimes it comes to foreground, but without user input focus.
Or flashes in taskbar and stays in background.
Sometimes the .Net Form is not shown in taskbar.

tested api methods:
SwitchToThisWindow
AllowForegroundActivation
AllowSetForegroundWindow
SetForegroundWindow
BringWindowToTop
ShowWindow
SetActiveWindow
SetFocus

Can anybody help me? give some tipps or code?

thanks a lot.
regards
Post Question To EggHeadCafe