2017-03-08 66 views
0

点击一个按钮,将投影waitcursor如何使定制光标当你点击一个按钮

enter image description here

,当你将鼠标悬停,例如在后退按钮就像当我怎样才能定制,这将是默认光标或手的事情,当我点击它会显示如下

enter image description here

预先感谢您

回答

0

我设法回答我的问题

private void btnLOGIN_Click(object sender, EventArgs e) 
    { 
     try 
     { 

      Cursor.Current = Cursors.WaitCursor; 
      Application.DoEvents(); 
      System.Threading.Thread.Sleep(500);//set time to load 

      if (txtUser.Text == "admin" && txtPass.Text == "") 
      { 
       this.Hide(); 
       MENU ss = new MENU(); 
       MessageBox.Show("Welcome to CornerFlag's Product Monitoring System!", "Login Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 
       ss.Show(); 
      } 
      else 
      { 
       MessageBox.Show("Invalid Input , Try Again ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 
       txtUser.Clear(); 
       txtPass.Clear(); 
      }; 

     } 
     finally 
     { 
      Cursor.Current = Cursors.Default; 
     } 

    } 
0
private void pictureBox1_MouseUp(object sender, EventArgs e) 
{ 
    pictureBox1.Cursor = Cursors.WaitCursor; 
}