Forum: Win32/Win64 API (native code)
Delphi
by luka,
15. Jun 2007
versuch es einmal hiermit:
procedure ShowForm(Form: TForm);
begin
if Assigned(Form) then
begin
ShowWindow(Form.Handle, SW_SHOWNORMAL);
Form.Visible := True;
Form.BringToFront;
end;
end;
Forum: Win32/Win64 API (native code)
Delphi
by luka,
14. Jun 2007
procedure BringAppToFront;
var Th1, Th2: Cardinal;
begin
Th1 := GetCurrentThreadId;
Th2 := GetWindowThreadProcessId(GetForegroundWindow, nil);
AttachThreadInput(Th2, Th1, True);
try
SetForegroundWindow(Application.Handle);
Application.Restore;
finally