Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要做的是在windows窗体上的datagridview中单击一个单元格,并根据滚动方向和滚轮鼠标的滚动次数向上或向下更改单元格的内容(一个数字)。
我不知道从哪里开始我试着寻找,我主要想出了滚动问题,而这些问题没有用。
在 MouseWheel 事件上试试这个..
Private Sub DataGridView1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseWheel DataGridView1.CurrentCell.Value = DataGridView1.CurrentCell.Value + (e.Delta / 120) End Sub