VB.NET質問スレ(Part30)
■ このスレッドは過去ログ倉庫に格納されています
0877843
2009/08/16(日) 03:24:50はじめは
Private x As UShort = Val(TextBox1.Text)
と置いていましたが、下のようにしたところうまく動作しました。
アドバイスどうもありがとうございました。
Public Class Form1
Private x As UShort Private y As UShort Private z As UShort Private t As UShort
Private Sub Button1_Click なんたら
Timer1.Enabled = True
x = Val(TextBox1.Text) y = Val(TextBox2.Text) z = Val(TextBox3.Text) t = Val(TextBox4.Text)
End Sub
Private Sub Timer1_Tick なんたら
Timer1.Interval = t
If x < y Then
x += z
End If
Label1.Text = CStr(x)
End Sub
End Class
Private x As UShort = 5 などはうまくいくのに、なぜテキストを代入するとうまくいかないのでしょう?
■ このスレッドは過去ログ倉庫に格納されています