I am calling a login() method which handles connection to mysql server and then authenticating a user. Connecting to mysql server takes some time so I want to place a label which shows status of "Loading". I am doing in it something like this:
private void button_login_Click(object sender, EventArgs e)
{
label_status.Text = "Loading ...";
login();
}
But I dont see label_status text changed to "Loading ...". Instead it shows this status in label_status after login function gets back.
I dont know why is this? Is this some threading issue? Any help would be appreciated.