Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
Re: Problem mit Freigeben von CreateMessageDialog
6. Jan 2007, 15:00
Geht.
Delphi-Quellcode:
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
MessageForm: TForm;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
MessageForm.ShowModal;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
MessageForm := CreateMessageDialog('Test', mtInformation, []);
with MessageForm do
begin
BorderIcons := [];
BorderStyle := bsDialog;
Font.Height := 15;
Font.Style := [fsBold];
Color := $00F8E4D8;
Height := 55;
Width := 320;
FormStyle := fsStayOnTop;
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
FreeAndNil(MessageForm);
end;
Michael Ein Teil meines Codes würde euch verunsichern.
|