for 0->100
SplashScreen.SetCurrentTitle("Loading " + Math.Ceiling(procent).ToString() + "%");
//SplashScreen.Instance.Invalidate(); doesn't helps :(
Application.DoEvents();
Thread.Sleep(20);
that's splashscreen but I can see only 1->18 and then just wait 18->100 but can't see :(
how to show other 18->100 :)
this ?
public static BeginDisplay() : void
{
Instance.Visible = true;
unless (Instance.Created)
{
Instance.CreateControl();
}
_=SetWindowPos(Instance.Handle, (HWND_TOPMOST :> IntPtr), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
alphaBlend = if(Instance.FadeIn) (15 :> byte) else (255 :> byte);
Instance.SetBitmap((Instance.BackgroundImage :> Bitmap), alphaBlend);
when (Instance.FadeIn)
{
mutable tmrFade : Timer = Timer();
tmrFade.Interval = 10;
tmrFade.Tick += EventHandler(_fadeTick);
tmrFade.Start();
}
Instance.Show();
}
This probably means that your initialization code performs one long operation thus blocking the message queue. You should do the folllowing:
DoEvents
). This should be done periodically while performing initialization.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.