Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
147 views
in Technique[技术] by (71.8m points)

c# - Splash Screen Example

I only want a simple Splash Screen Example.

Get the Code, Insert my picture, add 2 lines of code to load and finish.

But all I can google is so complex, that is too much. I only want a form with a picture that goes more and more transparent until it hides automaticly and my window is shown.

I tried the "prettygoodsplashscreen" from Codeproject, but don't work for me.

Lang is c#.net 2.0

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Creating the splash screen can be as simple or complex as you make/want it to be.

private void Form1_Load(object sender, System.EventArgs e)
{
    // Display the splash screen
    var splashScreen = new SplashForm();
    splashScreen.Show()

    // On the splash screen now go and show loading messages
    splashScreen.lblStatus.Text = "Loading Clients...";
    splashScreen.lblStatus.Refresh();

    // Do the specific loading here for the status set above
    var clientList = _repository.LoadClients();

    // Continue doing this above until you're done

    // Close the splash screen
    splashScreen.Close()
}

Obviously the Splash Screen itself is something that you'd have to decide how you want it to look...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...