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

[RESOLVED] Label does not refresh on load

$
0
0
I'm trying to help someone on another forum it I can't see what the issue is here. The text changed event fires on the form load but the Label4 does not refresh. Label4.text is set at "Start" in the form design. TextBox2_TextChanged fires on the form load, it is set a "Start" in the form design, but the label stays at "Start". I'm guessing it is because the form isn't loaded yet. I tried doEvents and Label4.Refresh and that doesn't work. Anyone know why Label4 does not display "4444444444444"?


Code:

Public Class Form1

    Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged

        TextBox2.Text = "222222222222"
        Label4.Text = "4444444444444"


    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        Application.DoEvents()
        Label4.Refresh()

    End Sub
End Class


Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>