Current code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Gold = CInt(TextBox1.Text)
Dim Silver = CInt(TextBox2.Text) / 100
Dim Copper = CInt(TextBox3.Text) / 10000
Dim Result = (Gold + Silver + Copper) * 0.85
Label1.Text = Result & " Gold"
End Sub
and
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If (TextBox1.Text + TextBox2.Text + TextBox3.Text = "") Then
Button1.Enabled = False
Else
Button1.Enabled = True
End If
End Sub
How come whenever I start the program, and I enter numbers into textbox1, textbox2, and textbox3 the button does not get enabled?
Aucun commentaire:
Enregistrer un commentaire