Hi,
ich habe mich mal ein Tag lang mit VB beschäftigt und mich dann an einem Wecker versucht.
Das ist das Script:
Es wird aber nur einmal input1 - 1 gerechnet, danach stoppt das Script.
Was mach ich falsch?
Banana.Crafts
ich habe mich mal ein Tag lang mit VB beschäftigt und mich dann an einem Wecker versucht.
Das ist das Script:
PHP Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not IsNumeric(TextBox1.Text) Then
MsgBox("Enter a value.")
Else
Dim input1 As Integer = TextBox1.Text
Timer1.Enabled = True
Timer1.Interval = 1000
Me.Text = input1
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim input1 As Integer = TextBox1.Text
Dim input2 As String = TextBox2.Text
If input1 = 0 Then
Timer1.Enabled = False
MsgBox(input2, , "Time is over")
Else
input1 = input1 - 1
Me.Text = input1
End If
End Sub
End Class
Was mach ich falsch?
Banana.Crafts