积极答复者
更改鼠标的手势

问题
答案
-
你好,LinkLabel 在鼠标移上去的时候自动创建了一个Cursor.Hand的属性值在OnMouseMove,当鼠标移上去的时候。它使用OverrideCursor的属性,不幸的是,OverrideCursor属性是不可重写。这里的另一种方式来解决它。
你可以参照以下这里的代码:
http://bytes.com/topic/c-sharp/answers/596649-setting-linklabel-cursor
希望能帮到你。
谢谢
Jackie Sun [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jackie-SunModerator 2011年8月21日 5:02
全部回复
-
dear
你提到了用鼠标,所以你应该试试使用MouseMove事件
private void LinkLabel01_MouseMove(object sender, MouseEventArgs e) { LinkLabel01.Cursor = Cursors.HSplit; }
秘訣無它,唯勤而已 http://www.dotblogs.com.tw/yc421206/private void LinkLabel01_MouseEnter(object sender, EventArgs e)
{
LinkLabel01.Cursor = Cursors.HSplit;
}private void LinkLabel01_MouseMove(object sender, MouseEventArgs e)
{
LinkLabel01.Cursor = Cursors.HSplit;}】
今天我修改了一下,还是不行
-
你好,LinkLabel 在鼠标移上去的时候自动创建了一个Cursor.Hand的属性值在OnMouseMove,当鼠标移上去的时候。它使用OverrideCursor的属性,不幸的是,OverrideCursor属性是不可重写。这里的另一种方式来解决它。
你可以参照以下这里的代码:
http://bytes.com/topic/c-sharp/answers/596649-setting-linklabel-cursor
希望能帮到你。
谢谢
Jackie Sun [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jackie-SunModerator 2011年8月21日 5:02