Ask the Expert

SetForgroundWindow API function

SetForgroundWindow API function does not work with Microsoft Windows 2000. Is there any other suitable API that does the same task?

    Requires Free Membership to View

Actually, SetForgroundWindow works exactly as it is supposed to. What is different is that Microsoft fixed the incredibly annoying problem that used to plague NT4 and Win9x: applications stealing focus from the user is using. There are ways to fiddle around it, but Microsoft's taken an even tougher stance with Windows XP and the techniques that work on Windows 2000 will not work on Windows XP. You can still call SetForgroundWindow, but the window will flash three times in the taskbar to indicate your application needs attention.

This was first published in July 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: