timer触发控制
我想当按钮按下后触发TIMER事件,但是这个代码结果是一加载程序就触发了,错在哪里?请高手指点,或我的QQ593658084,Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
JDT1.Height = 140
JDT1.Enabled = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Timer1.Tick
Dim y As Integer
JDT1.Enabled = True
y = 2
If JDT1.Height <= 140 Then
JDT1.Height = JDT1.Height - y
If JDT1.Height = -2 Then
JDT1.Height = JDT1.Height + y
End If
End If
End Sub
Private Sub timer1_timer()
JDT1.Enabled = True
End Sub
End Class