1. 如何創建一個可改變大小沒有標題欄的窗體?(How to create a form with resizing borders and no title bar?)
form1.Text = string. Empty;
form1.ControlBox = false;
2. 如何在.NET的Windows窗體上啟用XP主題集?(How to use XP Themes with Windows Forms using the .Net?)
確認你的控件中FlatStyle屬性已經修改為System,再修改Main方法。
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application. Run(new Form1());
}
3. 如何為一個窗體設置一個默認按鈕?(How to set the default button for a form?)
form1.AcceptButton = button1;
4. 如何為一個窗體設置一個取消按鈕?(How to set the Cancel button for a form?)
form1.CancelButton = butt