نافذة FSplashScree لا تغلق بعد الدخول الى البرنامج
#1
السلام عليك ورحمة الله تعالى وبركاته
نافذة FSplashScreen
بعد الدخول الى البرنامج تبقى مفتوحة حت الخروج النهائي من البرنامج  ماذا يجب علي فعله حتى لا تبقى مفتوحة
الكود المستعمل
كود :
program Mdts; uses  Vcl.Forms,  Winapi.Windows,  UnitPasse in 'UnitPasse.pas' {FormPasse},  UMenu in 'UMenu.pas' {FMenu},  UnitMotPasse in 'UnitMotPasse.pas' {FormMotPasse},  UDMPasse in 'UDMPasse.pas' {DMPasse: TDataModule},  UDMMandat in 'UDM.pas' {DM: TDataModule},  UPrmMandat in 'UPrmMandat.pas' {FPrmMandat},  UBulletinMdt in 'UMdt.pas' {FMdt},  USplashScreen in 'USplashScreen.pas' {SplashScreen}; {$R *.res} begin  Application.Initialize;  SplashScreen:=TSplashScreen.Create(Application);  SplashScreen.Show;  SplashScreen.Update;  Application.MainFormOnTaskbar := True;  Application.CreateForm(TFMenu, FMenu);  Application.CreateForm(TDMPasse, DMPasse);  Application.CreateForm(TDM, DM);  Application.CreateForm(TSplashScreen, SplashScreen);  sleep(1000);  SplashScreen.close;  SplashScreen.Release;  Application.Run; end.

(22-07-2017, 06:27 PM)medreg كتب : السلام عليك ورحمة الله تعالى وبركاته
نافذة FSplashScreen
بعد الدخول الى البرنامج تبقى مفتوحة حت الخروج النهائي من البرنامج  ماذا يجب علي فعله حتى لا تبقى مفتوحة
الكود المستعمل
كود :
program Mdts; uses  Vcl.Forms,  Winapi.Windows,  UnitPasse in 'UnitPasse.pas' {FormPasse},  UMenu in 'UMenu.pas' {FMenu},  UnitMotPasse in 'UnitMotPasse.pas' {FormMotPasse},  UDMPasse in 'UDMPasse.pas' {DMPasse: TDataModule},  UDMMandat in 'UDM.pas' {DM: TDataModule},  UPrmMandat in 'UPrmMandat.pas' {FPrmMandat},  UBulletinMdt in 'UMdt.pas' {FMdt},  USplashScreen in 'USplashScreen.pas' {SplashScreen}; {$R *.res} begin  Application.Initialize;  SplashScreen:=TSplashScreen.Create(Application);  SplashScreen.Show;  SplashScreen.Update;  Application.MainFormOnTaskbar := True;  Application.CreateForm(TFMenu, FMenu);  Application.CreateForm(TDMPasse, DMPasse);  Application.CreateForm(TDM, DM);  Application.CreateForm(TSplashScreen, SplashScreen);  sleep(1000);  SplashScreen.close;  SplashScreen.Release;  Application.Run; end.

بعدما حذفت السطر
//  Application.MainFormOnTaskbar := True;

حلت المشكلة والسؤال مطروح هل حذف السطر السالف الذكر صواب أم خطأ
الرد
#2
جرب بهذا لتعديل البسيط 
كود :
program Mdts; uses Vcl.Forms, Winapi.Windows, UnitPasse in 'UnitPasse.pas' {FormPasse}, UMenu in 'UMenu.pas' {FMenu}, UnitMotPasse in 'UnitMotPasse.pas' {FormMotPasse}, UDMPasse in 'UDMPasse.pas' {DMPasse: TDataModule}, UDMMandat in 'UDM.pas' {DM: TDataModule}, UPrmMandat in 'UPrmMandat.pas' {FPrmMandat}, UBulletinMdt in 'UMdt.pas' {FMdt}, USplashScreen in 'USplashScreen.pas' {SplashScreen}; {$R *.res} begin Application.Initialize; SplashScreen:=TSplashScreen.Create(Application); SplashScreen.Show; SplashScreen.Update; Application.MainFormOnTaskbar := True; Application.CreateForm(TFMenu, FMenu); Application.CreateForm(TDMPasse, DMPasse); Application.CreateForm(TDM, DM); Application.CreateForm(TSplashScreen, SplashScreen); sleep(60); SplashScreen.close; SplashScreen.Release; Application.Run; end
لا يمكن تحقيق النجاح الا إذا أحببت ما تقوم به  Idea
الرد
#3
السلام عليكم
احذف ايضا

كود :
Application.CreateForm(TSplashScreen, SplashScreen);
رَبَّنَا اغْفِرْ لِي وَلِوَالِدَيَّ وَلِلْمُؤْمِنِينَ يَوْمَ يَقُومُ الْحِسَابُ
الرد
#4
(23-07-2017, 08:51 AM)B.M.AbdelAziZ كتب : السلام عليكم
احذف ايضا

كود :
Application.CreateForm(TSplashScreen, SplashScreen);
جزاكم الله عنا كل خير
الرد
#5
يمكنك الاستفادة من هذا الدرس للاخ سامر أصيل للSplash Screen, طريقة مختصرة وبأسطر أقل
[فيديو: https://www.youtube.com/watch?v=z-PgkwTwJ5E]
[-] كل من 1 user says قال شكرا ل Ben.Ja على المشاركة المفيدة
  • bassem_43
الرد


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم