I managed to make the button become grey, but I couldn't change the label.text from "Ready..." to "Processing..." and back to "Ready..." after completion of the task. Here is the code:
Public Class Form1 Dim i As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Button1.Enabled = False Label1.Text = "Processing..." Do Until i = 1000 TextBox1.Text = TextBox1.Text + i.ToString i += 1 Loop Button1.Enabled = True 'Label1.Text = "Ready..." End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label1.Text = "Ready..." End Sub End Class
*In actual, the do until loop contains more than just 2 lines.
What happened when I click the "Start" button were, it became grey, it filled up the texbox.text with number from 0 to 1000 and after it finished processing then the label.text change to "Processing..." where it supposed to appear before the loop start.