AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Second Form and Thread

Ein Thema von mohfa · begonnen am 4. Mai 2008 · letzter Beitrag vom 7. Mai 2008
 
christian_r
(Gast)

n/a Beiträge
 
#3

Re: Second Form and Thread

  Alt 5. Mai 2008, 03:02
Good morning.

A modal form has not to be closed with "TForm.Close".

Zitat von Delphi Help:
To close a modal form, set its ModalResult property to a nonzero value.
As next here is the example of the same help topic. It explains, how to close the modal form in the right way.

Delphi-Quellcode:
procedure TMyDialogBox.OKButtonClick(Sender: TObject);

begin
  ModalResult := mrOK; // mrOK ...
end;

procedure TMyDialogBox.CancelButtonClick(Sender: TObject);
begin
  ModalResult := mrCancel; // ... and mrCancel are nonzero values
end;

// This code brings up the modal dialog from Form1 when a button is clicked. It causes a Beep if the OK button is clicked.

procedure TForm1.Button1Click(Sender: TObject);

begin
  if MyDialogBox1.ShowModal = mrOK then
    Beep;
end;
So you don't need to thread this modal form for that simple problem.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:04 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-2025 by Thomas Breitkreuz