【发布时间】:2011-01-28 04:21:33
【问题描述】:
我只想要一个简单的启动画面示例。
获取代码,插入我的图片,添加 2 行代码以加载并完成。
但是我能用谷歌搜索的东西太复杂了,太多了。我只想要一个带有越来越透明的图片的表单,直到它自动隐藏并显示我的窗口。
我尝试了 Codeproject 中的“prettygoodsplashscreen”,但不适合我。
Lang 是 c#.net 2.0
【问题讨论】:
标签: c#
我只想要一个简单的启动画面示例。
获取代码,插入我的图片,添加 2 行代码以加载并完成。
但是我能用谷歌搜索的东西太复杂了,太多了。我只想要一个带有越来越透明的图片的表单,直到它自动隐藏并显示我的窗口。
我尝试了 Codeproject 中的“prettygoodsplashscreen”,但不适合我。
Lang 是 c#.net 2.0
【问题讨论】:
标签: c#
创建启动画面可以像您制作/想要的那样简单或复杂。
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()
}
显然,启动画面本身是您必须决定您希望它的外观的东西......
【讨论】:
为了让您的初始屏幕成为区域初始屏幕,除了显示正在执行的操作(例如加载客户端)或通过 ProgressBar 控件显示应用程序启动的进度之外,它不应包含其他代码。
步骤如下:
稍后我将添加更多细节。现在得走了。
【讨论】: