Thema: Delphi WMSize zu früh

Einzelnen Beitrag anzeigen

luka

Registriert seit: 10. Aug 2006
Ort: Cottbus
33 Beiträge
 
Delphi 2009 Professional
 

Re: WMSize zu früh

  Alt 14. Jun 2007, 21:26
Delphi-Quellcode:
procedure BringAppToFront;
var Th1, Th2: Cardinal;
begin
  Th1 := GetCurrentThreadId;
  Th2 := GetWindowThreadProcessId(GetForegroundWindow, nil);
  AttachThreadInput(Th2, Th1, True);
  try
    SetForegroundWindow(Application.Handle);
    Application.Restore;
  finally
    AttachThreadInput(Th2, Th1, False);
  end;
end;
  Mit Zitat antworten Zitat