Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TForm resetten (https://www.delphipraxis.net/13965-tform-resetten.html)

sCrAPt 29. Dez 2003 23:42


TForm resetten
 
HiH :o
Wie kann ich per Button-Klick ein TForm so zurücksetzen wie ich es in Delphi geproggt habe?

:dp:, sCrAPt

SleepyMaster 29. Dez 2003 23:50

Re: TForm resetten
 
Ich würde es so machen:

Delphi-Quellcode:
uses
  ShellAPI;

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(0,'open',PChar(ParamStr(0)),nil,PChar(ExtractFileDir(ParamStr(0))),SW_HIDE);
Application.Terminate;
end;

sCrAPt 30. Dez 2003 00:02

Re: TForm resetten
 
Ich will aber mit dem MainForm Form2 resetten...

:angle:, sCrAPt

SleepyMaster 30. Dez 2003 00:05

Re: TForm resetten
 
Das ist einfach:

Delphi-Quellcode:
Form2.Destroy;
Form2:=TForm2.Create(self);
Form2.Show;

sCrAPt 30. Dez 2003 00:56

Re: TForm resetten
 
huhuhuhui! Das funktioniert :D Danke sehr

:dance: ,sCrAPt


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:17 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz