Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to firstname.lastname@example.org.
Bo Berglund wrote: > This is code snippets we needed to add to our program (Visual Basic, I > have the Delphi version as well) when MS decided that pop-up is bad. > We needed our dialogs to come out on top so the user could see them... > > It is a user level system setting so each user needs to set the value. > Basically the timeout set determines the time from last keyboard entry > until it is OK to pop a window on top. Hmm interesting. Apparently it also works to set that value to 0, display the popup and change it back again. I also found this which sounds cleaner than changing a global parameter: function ForceForegroundWindow(hWnd: THandle): BOOL; var hCurWnd: THandle; begin hCurWnd := GetForegroundWindow; AttachThreadInput( GetWindowThreadProcessId(hCurWnd, nil), GetCurrentThreadId, True); Result := SetForegroundWindow(hWnd); AttachThreadInput( GetWindowThreadProcessId(hCurWnd, nil), GetCurrentThreadId, False); end; None of this is tested of course.. Tony