Hi guys,
i do have the problem, if i try to set the visibility of my Form to false.
if the form is in FormWindowState = Normal, everything is working as expected.
but if i try it in FormWindowState = Maximized, it will cause the problem, that programmatically my form is visible = false, but will be about half a second later.
does anyone knows this problem?
and more important, does anyone knows a solution? :D
Here my code to set the visibility:
private void notifyIcon_DoubleClick(object Sender, EventArgs e)
{
if (!allowshowdisplay)
{
this.Left = Screen.PrimaryScreen.WorkingArea.Width / 2 - Width / 2;
this.Top = Screen.PrimaryScreen.WorkingArea.Height / 2 - Height / 2;
}
if (!this.Visible)
{
SplashScreen.ShowSplashScreen(new Rectangle { Size = this.Size, Location = this.Location }, @"\Resources\wait.jpg", false);
Thread.Sleep(100);
}
this.allowshowdisplay = true;
this.Visible = !this.Visible;
if (this.Visible)
SplashCloseThreaded();
else
SplashScreen.CloseForm();
}