BMS-HOSxP Community
HOSxP => Delphi / Pascal => ข้อความที่เริ่มโดย: Multithreading ที่ สิงหาคม 19, 2011, 13:18:09 PM
-
ลอง Create FormLogin ใน Event OnShow หรือ OnCreate ของ MainForm
ก็ไม่ได้ โปรแกรมจะแสดง FormLogin ก่อน ที่ MainForm จะ Show ครับ
-
:) :) :) :)
-
ใน FormActivate ได้มั้ยครับ
แล้วค่อยสร้างฟอร์มในนั้น
Application.CreateForm(TPasswordDlg, PasswordDlg);
PasswordDlg.ShowModal;
ก่อน Application.Run;
-
ใช่ครับ จะทำแบบ ของ อ.naj เลยครับ
-
ลอง เพิ่ม timer ได้ไหมครับ
ลองใส่ open login form ใน event ใน timer ตั้ง timer ให้ 3 วิค่อยขึ้น login form
timer set ให้ enabled ตอน on show ของ main form
-
ใช้ Timer ได้ผลตามที่ต้องการ
แปะ Timer1 ( interval=1,Enable=true)
procedure TFormMain.Timer1Timer(Sender: TObject);
begin
timer1.Enabled:=false;
FormLogin:= TFormLogin.Create(Application);
try
FormLogin.ShowModal();
finally
FormLogin.Free;
end;
end