Re: [.NET] 滑鼠事件

看板Visual_Basic作者 (靜靜的藍天)時間16年前 (2009/11/17 22:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
自己想出來囉.. 很簡單...只是自己掉進死胡同.. Public Class Form1 Dim count As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick count = count + 1 TextBox1.Text = count End Sub Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown If e.Button = Windows.Forms.MouseButtons.Left Then Timer1.Enabled = True End If End Sub Private Sub Button1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseUp Timer1.Enabled = False End Sub End Class ※ 引述《kinggto (靜靜的藍天)》之銘言: : 各位大大好... : 目前新學VB.net,先前對VB6有一定程度的摸索.. : 最近想要寫一個小功能... : 無奈測試了很多次.. : 都是失敗作廠 : 希望大大們可以給小弟一些建議.. : 想法:滑鼠去按一個button 但是試點住不放的情況之下.. : button裡面有一個計數器,會不斷的加上... : 直到滑鼠放開停止.. : 目前有試過用time來控制..失敗 : 用button_mousedown + Windows.Forms.MouseButtons.Left ...失敗 : 希望大大們可以提一些看法與意見.. : 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.117.186.138
文章代碼(AID): #1B0gryOw (Visual_Basic)
討論串 (同標題文章)
本文引述了以下文章的的內容:
3
8
完整討論串 (本文為第 3 之 3 篇):
3
8
2
2
文章代碼(AID): #1B0gryOw (Visual_Basic)