摘要:
publicboolIsConnected(){SqlConnectionconnection=newSqlConnection(connectionString);//connectionString数据库连接字符串try{if(connection.State!=ConnectionState.Open){connection.Open();}returntrue;}catch{returnfalse;}} 阅读全文
摘要:
//在Form1窗体中,按钮事件中,Form2form=newForm2();form.FormBorderStyle=FormBorderStyle.None;form.TopLevel=false;//指示子窗体非顶级窗体this.panel1.Controls.Add(form);//将子窗体载入form.Show(); 阅读全文