Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Winform Splash Screen

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angelina - 31 Jul 2006 09:31 GMT
What is the best practice to create a splash screen in .net winforms
applications so that the splash screen loads immediately after we start
application and closes when all dlls loading and initializations is
completed. I don't want any idle situation to be seen by the user.

Currently I have created a form and set it visible at start and close it
after I call application.run for my main form. The problem is that splash
screen appears after 2-5 seconds of starting the application and close
immediately.

- Angelina
GAZ - 31 Jul 2006 10:58 GMT
Unless you have some major and lengthy operations to set up your application
environment the splash screen will close almost immediately. In any case
quite a number of dlls have to be already loaded in order to show the splash
form, hence.....

In VS2005 (if I remember correctly you use VS2003) there is a SplashScreen
item that you can add to your solution and set your application to show it
when it's starting-up. However, it closes down almost immediately after you
start the application.

You have to create some form of delay on your splash screen in order to have
it shown for a longer period of time. Try with the timer control and set the
delay for five seconds.

BR,

GAZ

> What is the best practice to create a splash screen in .net winforms
> applications so that the splash screen loads immediately after we start
[quoted text clipped - 7 lines]
>
> - Angelina
GAZ - 31 Jul 2006 13:21 GMT
With an addition. There is a My.Application.MinimumSplashScreenDispleyTime
property through which you can set up the amount of time the splash screen
stays visible.

BR,

GAZ

> Unless you have some major and lengthy operations to set up your
> application environment the splash screen will close almost immediately.
[quoted text clipped - 25 lines]
>>
>> - Angelina
Angelina - 31 Jul 2006 14:00 GMT
But I am using .NET 1.1 :(

> With an addition. There is a My.Application.MinimumSplashScreenDispleyTime
> property through which you can set up the amount of time the splash screen
[quoted text clipped - 33 lines]
>>>
>>> - Angelina
rhaazy - 31 Jul 2006 15:38 GMT
You should use a main class and call all of your forms from that, so
something like this:

public class clsMain
{
    public clsMain()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    [STAThread]
    static void Main()
    {
        frmSplash objfrmSplash = new frmSplash();
        objfrmSplash.ShowDialog();
        clsGlobal.g_objfrmMDIMain = new frmMDIMain();
        Application.Run(clsGlobal.g_objfrmMDIMain);
    }
    //This is the Single Threaded Apartment Model(out of our scope) of the
application which will run the Main function
    //when the application starts
}
on your splash screen form place a timer that closes the form after a
few seconds.
(Note:) dont forget to remove the main class from the form that may
already be your main form.

/// <summary>
/// The main entry point for the application.
/// </summary>
//[STAThread]
//static void Main()
//{
//    Application.Run(new Form1());
//}
//because we cannot have two Main function.We are invoking everything
from clsMain

> But I am using .NET 1.1 :(
>
[quoted text clipped - 35 lines]
> >>>
> >>> - Angelina

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.