this is on Splash Class:
static private void ShowForm()
{
sp = new Splash();
Application.Run(sp);
}
static public void CloseForm()
{
if (sp != null)
{
if (sp.label1.InvokeRequired)
{
CloseWindow d = new CloseWindow(CloseForm);
sp.Invoke(d);
}
else
{
if (sp != null && sp.IsDisposed == false)
{
// Make it start going away.
sp.m_dblOpacityIncrement = -sp.m_dblOpacityDecrement;
}
th = null; // we don't need these any more.
sp = null;
}
}
}
static public void ShowSplash()
{
//#if (!DEBUG)
if (sp.label1.InvokeRequired)
{
Show d = new Show(ShowSplash);
sp.Invoke(d);
}
else
{
sp.Visible = true;
}
//#endif
}
This is on the main form:
static void Main()
{
bool retry = true;
bool bLicense = false;
bool chkPoint = false;
Splash.ShowSplashScreen();
....
Application.Run(new MainForm());
}
public MainForm() //MainForm Constructor
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
...
System.Threading.Thread.Sleep(500);
Splash.CloseForm();
}
This should be all you want...
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
Post the code you are using, to show/hide splash screen
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:3E**********************************@microsof t.com... Hi,
After the splash that loads de application sometimes, and I repeat
SomeTimes, the app get's invisible. It just don't appear on my task bar
neither on the screen. But if I do Alt + TAb the application is there and
cames back to normal, also if I open the task manager the application is
there.
How can I prevent this to happen?
Thanks In Advance