For the below code, the program starts copying file in the CopyFiles() Function before it does Label11.Visible = True or Button1.Enabled = False. Anyone know why? I did try putting in a System.Threading.Thread.Sleep(3000) command as well, but that didn't work either.
Any help would be appreciated!
Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label11.Visible = True
Button1.Enabled = False
' System.Threading.Thread.Sleep(3000)
CopyFiles()
Button1.Visible = False
End Sub