How can i customize when clicking a button that will project a waitcursor
like when you hover your mouse, for example in the back button , it will be default cursor or the hand thing and when i click it will display like this
thank you in advance
i manage to answer my question
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;
}
}