VB:制作窗体和编写事件代码,在文本框中统计在该窗口上鼠标单击的次数.单机一次显示1,两次显示2...

2024-12-22 16:46:07
推荐回答(3个)
回答1:

private sub form_click()
dim i as integer
i=i+1
text1.text=val(text1)+1
end sub

回答2:

Private Sub Form_Click()
Static N As Integer
N = N + 1
text1.Text = N
End Sub

回答3:

可以
Private Sub Form_Load()
Text1 = 0
End Sub

Private Sub Form_click()
Text1 = Val(Text1) + 1
End Sub