Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

Commands executing in wrong order?

$
0
0
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.

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

Any help would be appreciated!

Viewing all articles
Browse latest Browse all 27189

Trending Articles