5
A
回答
6
Here is a nice example.如果您使用的是Windows窗體。
3
(我在我的Mac,所以我現在可能有點生疏...)
你需要打開你的項目的偏好。
項目 - >首選項
在第一個選項卡,選擇有所謂的「啓動對象」的下拉菜單。默認值是Form1.cs,你應該可以將其更改爲啓動畫面窗口。
2
添加對Microsoft.VisualBasic的引用。然後在Program.cs中編寫下面的代碼
static class Program
{
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
new MyApp().Run(args);
}
public class MyApp : WindowsFormsApplicationBase
{
protected override void OnCreateSplashScreen()
{
this.SplashScreen = new MySplashScreen();
}
protected override void OnCreateMainForm()
{
// Do stuff that requires time
System.Threading.Thread.Sleep(5000);
// Create the main form and the splash screen
// will automatically close at the end of the method
this.MainForm = new MyMainForm();
}
}
}
3
在Visual Studio 2010中,這非常簡單。只需將圖像添加到解決方案中,然後右鍵單擊該圖像,並將其構建操作設置爲「SplashScreen」。
無需編碼!
相關問題
- 1. 如何在eclipse中添加視頻/實時啓動畫面?
- 2. 如何在ios的啓動畫面中添加.gif文件?
- 3. 如何在wp7中添加啓動畫面
- 4. 如何在啓動畫面中添加進度條pyqt4
- 5. 如何加快加載啓動畫面
- 6. 如何在vb.net的啓動畫面上添加圖像
- 7. Ember JS實現啓動畫面/加載啓動畫面
- 8. 如何在我的iPhone應用程序中添加兩個啓動畫面?
- 9. 如何在頁面完全加載後才啓動CSS動畫?
- 10. WPF動畫啓動畫面
- 11. 如何在tableView中添加動畫Swift
- 12. 如何在自動啓動時隱藏MFC啓動畫面?
- 13. 卡在Android Studio啓動畫面(啓動畫面)!
- 14. 如何在uboot中啓用dm 365上的啓動畫面?
- 15. 如何在ios啓動畫面上實現mp4動畫?
- 16. 在活動中包含啓動畫面
- 17. 如何在Excel啓動時創建啓動畫面?
- 18. 如何僅在首次啓動時使用啓動畫面?
- 19. 如何添加動畫BottomSheetDialogFragment
- 20. 如何將啓動畫面加載視圖直到其加載
- 21. j2me啓動畫面
- 22. jQuery啓動畫面
- 23. 在cocos2d中添加動畫
- 24. C#啓動加載頁面
- 25. 啓動畫面的問題 - C# - VS2005
- 26. 如何編寫啓動畫面?
- 27. 如何隨機化啓動畫面?
- 28. 如何禁用SDL啓動畫面?
- 29. 如何關閉啓動畫面
- 30. 在libharu中動態添加頁面C
@ n535 - 很好的例子。 – Moshe 2010-04-04 15:06:39