Hi, friends
I cause splash-form during some action in additional thread. To disable remaining application windows, I use the following code
{ Tfrm_main }
procedure Tfrm_main.BtnRunClick(Sender: TObject);
var f: Tfrm_splash;
ListDisabled: TList;
begin
f:= Tfrm_splash.Create(Self);//splash
ListDisabled:= Screen.DisableForms(f);
try
FNewThread:= TFgrndThread.Create(True); //remaining parameters are determined in the constructor method
FNewThread.Start;
f.FormStyle:= fsNormal;
f.Show;
while not FNewThread.FIsFinishedThread do //FIsFinishedThread - property of the termination of thread
begin
f.Label1.Caption:= TimeToStr(Now);
Application.ProcessMessages;
end;
f.Close;
finally
FreeAndNil(f);
end;
Screen.EnableForms(ListDisabled);
if frm_main.CanFocus then frm_main.SetFocus;
end;
In MSWindows behavior of a window it, as expected. But in Debian with a working surrounding of gnom splash-form hides under a window to which I passed focus.
this behavior in Debian gnom
http://s019.radikal.ru/i606/1704/82/ff18c51ad188.gifthis behavior in MSWindows
http://s56.radikal.ru/i154/1704/e7/95f73970c656.gifI tried to change FormStyle properties to fsStayOnTop, but then splash-form remains always.
I can correct somehow a code to receive the same behavior, how in MSWindows?
p.s. I applied archive of the project, you can try to launch it.