03 2012 档案
摘要:C#中,UseWaitCursor属性的问题,net2.0新增了一个属性——UseWaitCursor,即让指定的控件显示漏斗光标,但大部分情况下,这个属性不能正常工作。UseWaitCursor使用的方式如下:this.UseWaitCursor=true; //显示漏斗光标this.UseWaitCursor=false; //显示箭头光标例如在按纽点击事件中,我们可以这样做:private void button1_Click(object sender,EventArgs e){ this.UseWaitCursor=true; 代码段…… this.UseWaitCursor=fal
阅读全文
摘要:首先在登陆按钮添加单击事件:private void OKbtn_Click(object sender, System.EventArgs e) { if(user.Login()) { this.DialogResult = DialogResult.OK;//此处用public布尔变量标示登陆结果也可以 this.Close(); } } 然后,改写Main函数: [STAThread] static void Main() { LoginForm loginForm = new LoginForm(); loginForm.ShowDialog(); if( loginForm.D..
阅读全文

浙公网安备 33010602011771号