以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- AddHandler ,AddressOf 设置鼠标离开变成手型的设置 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=108283) |
|
-- 作者:李小胖 -- 发布时间:2017/10/19 14:53:00 -- AddHandler ,AddressOf 设置鼠标离开变成手型的设置 AddHandler ct.MouseEnter,AddressOf QJ_MouseEnter 在全局代码里面 QJ_MouseEnter 把鼠标设置成为 = System.Windows.Forms.Cursors.Hand 这个应该怎么写? |
|
-- 作者:有点甜 -- 发布时间:2017/10/19 16:10:00 -- 绑定mouseMove事件
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.hand |
|
-- 作者:李小胖 -- 发布时间:2017/10/19 17:24:00 -- 绑定mouseMove事件 应该怎么写呢?
|
|
-- 作者:有点甜 -- 发布时间:2017/10/19 17:33:00 --
Public Sub qj_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) |
|
-- 作者:李小胖 -- 发布时间:2017/10/19 20:17:00 -- Dim ct As New Windows.Forms.ListView ct.Dock = Windows.Forms.DockStyle.Fill ct.Name = "ListView1" \'ct.LargeImageList = ImageList ct.View = System.Windows.Forms.View.SmallIcon \'切换图标模式 \'ct.View = System.Windows.Forms.View.List \'切换图标模式 ct.SmallImageList = ImageList e.Form.Controls("Panel1").BaseControl.Controls.Add(ct) AddHandler ct.Click, AddressOf QJ_doubleclick AddHandler ct.MouseEnter, AddressOf QJ_MouseEnter AddHandler ct.MouseHover, AddressOf QJ_Hover 全局代码那边写的是 Public Sub QJ_MouseEnter(ByVal sender As Object, ByVal e As EventArgs) System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand End Sub Public Sub QJ_MouseLeave(ByVal sender As Object, ByVal e As EventArgs) System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand End Sub 我测试了这样写没用,鼠标没变化, 能帮我修改下么? [此贴子已经被作者于2017/10/20 8:44:36编辑过]
|
|
-- 作者:有点甜 -- 发布时间:2017/10/19 20:21:00 -- 绑定mousemove事件,看4楼代码。 |
|
-- 作者:有点甜 -- 发布时间:2017/10/19 20:22:00 -- 如果还有问题,实例发上来测试。 |
|
-- 作者:李小胖 -- 发布时间:2017/10/20 8:54:00 --
|
|
-- 作者:有点甜 -- 发布时间:2017/10/20 9:03:00 -- 叫你绑定mousemove事件啊,要说多少次?只有用mousemove事件才能做到你要的效果。
Public Sub qj_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) |
|
-- 作者:李小胖 -- 发布时间:2017/10/20 9:25:00 -- 以下是引用有点甜在2017/10/20 9:03:00的发言:
叫你绑定mousemove事件啊,要说多少次?只有用mousemove事件才能做到你要的效果。
Public Sub qj_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) AddHandler ct.MouseEnter, AddressOf QJ_MouseEnter \'这个是鼠标进入, 都绑定 qj_MouseMove? 这样写的么? AddHandler ct.MouseEnter, AddressOf qj_MouseMove AddHandler ct.MouseHover, AddressOf QJ_Hover \'这个是鼠标离开 都绑定 qj_MouseMove 这样写的么? AddHandler ct.MouseHover, AddressOf qj_MouseMove
|