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
 
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#1

Second Form and Thread

  Alt 4. Mai 2008, 21:48
Hi , in my application i use a Second Form which is created on RunTime
Delphi-Quellcode:
var
MyNewForm:TSecondForm { this is the Second Form }
.
.
On the Main Form Creat Event
begin
if Not Assigned(MyNewForm) then
MyNewForm:=TSecondForm.create(Nil);
end;

// and release it on main Form Destroy event

MyNewForm.release;
in this Second Form i have 3 Buttons and 2 Labels

Delphi-Quellcode:
on main form button1 click event
MyNewForm.ShowModal;
when i launch this Second Form for the First Time every thing goes well , but when i launch it for the Second time it Freezes the Form is Shown but all other Controls are Hidden ( 3 BUTTONS + 2 LABELS ).
i thought it's because the Form is not safe Threaded.
but how could i thread it , the Values of the 2 labels are from the Main Form
Delphi-Quellcode:
.
.
MyNewForm.label1.caption:={mainform.}label1.caption;
MyNewForm.label2.caption:={mainform.}label2.caption;
.
.
so how could i thread my SecondForm so that whenever i launch it it will not freeze and all their controls are still Visible .


Regards.
  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 04:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz