Jalaj

January 30, 2007

WinAPI : Prevent Setting foreground window

Filed under: Visual Basic, WinAPI — Jalaj @ 5:20 am

The earliest Windows Operating Systems allowed any process to set the foreground window. However with Windows98/Me restriction were placed for which process should be allowed to set a foreground window. That may be the process itself in the foreground or a process started by it or the process that last received the input event. Any other process can set foreground window only if there is no other process in foreground or explicitly allowed using the AllowSetForegroundWindow function or no lock has been placed using LockSetForegroundWindow function. Windows98/Me allows setting a foreground lock timeout which if set to zero makes the operating system behave as with the earlier versions.
(more…)

Blog at WordPress.com.