启动画面示例

Kov*_*ovu 4 c#

我只想要一个简单的Splash Screen示例.

获取代码,插入我的图片,添加2行代码加载并完成.

但我只能谷歌这么复杂,太多了.我只想要一张图片越来越透明,直到它自动隐藏并显示我的窗口.

我尝试了Codeproject的"prettygoodsplashscreen",但不适合我.

Lang是c#.net 2.0

Ric*_*ard 10

创建启动画面可能与您想要的一样简单或复杂.

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()
}
Run Code Online (Sandbox Code Playgroud)

显然,Splash Screen本身就是你必须决定你想要它的样子......