Einzelnen Beitrag anzeigen

Shark99

Registriert seit: 16. Mai 2007
403 Beiträge
 
#1

Delphi 7 + Vista Ready Code = ShowModal Problem

  Alt 12. Aug 2010, 20:12
Ich benutze den Code von dieser Seite damit meine App in der Taskbar das Preview Bild bekommt:

Quelle: http://www.installationexcellence.co...nal/Index.html
Delphi-Quellcode:
ShowWindow(Application.Handle, SW_HIDE);
SetWindowLong(Application.Handle, GWL_EXSTYLE,
  GetWindowLong(Application.Handle, GWL_EXSTYLE) and not WS_EX_APPWINDOW
  or WS_EX_TOOLWINDOW);

ShowWindow(Application.Handle, SW_SHOW);
Delphi-Quellcode:
procedure TMainForm.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  Params.ExStyle := Params.ExStyle and not WS_EX_TOOLWINDOW or
    WS_EX_APPWINDOW;
end;
Delphi-Quellcode:
interface

protected
procedure WMSyscommand(var Message: TWmSysCommand); message WM_SYSCOMMAND;

implementation

procedure TMainForm.WMSyscommand(var Message: TWmSysCommand);
begin
  case (Message.CmdType and $FFF0) of
    SC_MINIMIZE:
    begin
      ShowWindow(Handle, SW_MINIMIZE);
      Message.Result := 0;
    end;
    SC_RESTORE:
    begin
      ShowWindow(Handle, SW_RESTORE);
      Message.Result := 0;
    end;
  else
    inherited;
  end;
end;
So weit so gut, aber nun kommt der vierte Schritt:
Delphi-Quellcode:
procedure TMainForm.AboutActionExecute(Sender: TObject);
begin
  AboutForm := TAboutForm.Create(Self);
  try
    AboutForm.PopupParent := Self;
    AboutForm.ShowModal;
  finally
    FreeAndNil(AboutForm);
  end;
end;
Dieser geht nicht weil Delphi 7 kein PopupParent kennt.

Durch die Suchfunktion habe ich leider keine Lösung gefunden.
  Mit Zitat antworten Zitat