@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Enables the specified process to set the foreground window using the SetForegroundWindow function. The calling process must already be able to set the foreground window. For more information, see Remarks later in this topic. !!!!C# Signature: [DllImport("user32.dll")] static extern bool AllowSetForegroundWindow(int dwProcessId); !!!!VB.Net Signature: <DllImport("user32.dll")> _ Shared Function AllowSetForegroundWindow(ByVal dwProcessId As Integer) As Boolean End Function !!!!User-Defined Types: None. !!!!Notes: None. !!!!Tips & Tricks: ASFW_ANY = -1 // by MSDN !!!!Sample Code: AllowSetForegroundWindow(System.Diagnostics.Process.GetCurrentProcess().Id) !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Remarks The system restricts which processes can set the foreground window. A process can set the foreground window only if one of the following conditions is true: - The process is the foreground process. - The process was started by the foreground process. - The process received the last input event. - There is no foreground process. - The foreground process is being debugged. - The foreground is not locked (see LockSetForegroundWindow). - The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). - No menus are active. Documentation: AllowSetForegroundWindow@msdn on MSDN
Edit user32.AllowSetFo...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.