最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
改动鼠标形状的一小段代码
时间:2022-07-02 18:06:17 编辑:袖梨 来源:一聚教程网
主要还是调用了系统的方法,因为实在做鼠标时间是开发的,想了好久才找到,留在这里,以作纪念。
public class Grid : GoldSoft.Inf.UI.Controls.Grid.Grid
{
///
/// 必需的设计器变量。
///
private System.ComponentModel.Container components = null;
public Grid()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent();
// TODO: 在 InitComponent 调用后添加任何初始化
this.MouseMove += new MouseEventHandler(n_MouseMove);
}
private void n_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.Cursor=Cursors.SizeWE;
//以上用来修改鼠标的形状,在Cursors加.就可以看到了
Console.WriteLine("====> Test <==== ("+e.X+","+e.Y+")");
}
///
/// 清理所有正在使用的资源。
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}
#region 组件设计器生成的代码
///
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
///
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
相关文章
- 明末渊虚之羽在哪里获取头陀的回响 头陀回响获取方法 07-30
- 2025年全球十大加密货币交易平台App排名 最新交易所榜单推荐 07-30
- 剑星战斗思路是什么 战斗思路分享 07-30
- Twinstake 推出 ETH 质押「启动与退出计算机」 07-30
- 燕云十六声寄棺主无伤怎么通关 鬼神愁无伤逃课打法攻略 07-30
- 明末渊虚之羽铜灯盏在哪里获取 铜灯盏获得方法介绍 07-30