随笔分类 -  C#

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页

摘要:实现效果: 知识运用: KeyEventArgs类的Alt,Handled属性 public virtual bool Alt {get;} //获取一个值 该值指示是否曾按下Alt键 public bool Handled {get; set;} //获取或设置一个值 该值指示是否处理过此事件 / 阅读全文

posted @ 2019-01-18 23:16 努力成长静待花开 阅读(248) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: KeyEventArgs类的KeyValue属性 public int KeyValue {get;} //获取KeyDown或KeyUp事件的键盘值 SendKeys类的Send方法 实现代码: 阅读全文

posted @ 2019-01-18 22:52 努力成长静待花开 阅读(442) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: AIP函数GetKeyState //针对已处理过的按键 在最近一次输入信息时 判断指定虚拟键的状态 intkey:预测试的虚拟键键码 实现代码: 阅读全文

posted @ 2019-01-18 22:06 努力成长静待花开 阅读(1565) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: KeyEventArgs类的KeyCode属性 实现代码: 阅读全文

posted @ 2019-01-18 21:09 努力成长静待花开 阅读(104) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: KeyEventArgs类的KeyCode属性 //用来为KeyDown或KeyUp事件提供数据 public Keys KeyCode { get; } //其KeyCode属性用来获取KeyDown或KeyUp事件的键代码 实现代码: 阅读全文

posted @ 2019-01-18 20:57 努力成长静待花开 阅读(124) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: API函数mouse_event //模拟鼠标的事件 [DllImport("user32.dll", CallingConvention = CallingConvention.StdCall)] public extern static IntPtr mouse_even 阅读全文

posted @ 2019-01-18 20:29 努力成长静待花开 阅读(329) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Graphics类的DrawLine方法和MouseEventArgs类的x,y属性 实现代码: 阅读全文

posted @ 2019-01-18 18:43 努力成长静待花开 阅读(518) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: TextBox控件的DoDragDrop方法 //用来开始拖放操作 public DragDropEffects DoDragDrop (Object data,DragDropEffects allowedEffects) DataObject类的GetData方法 pub 阅读全文

posted @ 2019-01-18 17:56 努力成长静待花开 阅读(621) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: SendKeys类的Send方法 //向活动应用程序发送击键 public static void Send (string keys) 实现代码: 阅读全文

posted @ 2019-01-18 13:44 努力成长静待花开 阅读(177) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: API函数ShowCursor //控制鼠标指针的可视性 实现代码: 阅读全文

posted @ 2019-01-17 22:42 努力成长静待花开 阅读(381) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Cursor类中的相关属性 实现代码: 阅读全文

posted @ 2019-01-17 21:31 努力成长静待花开 阅读(300) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: API函数SwapMouseButton //决定是否要交换鼠标左右键的功能 //bSwap :如果为非零 则交换 否则恢复正常状态 //返回值: 非零则表明已经交换 否则返回零 实现代码: 阅读全文

posted @ 2019-01-17 18:14 努力成长静待花开 阅读(268) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Form类的Cursor属性 实现代码: 阅读全文

posted @ 2019-01-17 17:32 努力成长静待花开 阅读(347) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Label控件的Cursor属性 //表是当鼠标指针位于控件上时显示的光标 实现代码: 阅读全文

posted @ 2019-01-17 16:54 努力成长静待花开 阅读(291) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 通过在From中重写Control类的虚方法 WndProc 来获取信息 protected virtual void WndProc(ref Message m) Message结构的属性 通过实现IMessageFilter接口来创建消息筛选器 从而截取Windows消息 阅读全文

posted @ 2019-01-17 15:57 努力成长静待花开 阅读(215) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: MouseEventArgs类的Button属性 //用来获取按下的是那个键 public MouseButtons Button {get;} Left //左键 None //未曾 XButton1 //拓展按钮1 Right //右键 Middle //中键 XButt 阅读全文

posted @ 2019-01-17 14:58 努力成长静待花开 阅读(189) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: MouseEventArgs类的X属性Y属性 //该类用来为MouseUp MouseDown 和 MouseMove事件提供数据 实现代码: 阅读全文

posted @ 2019-01-17 11:47 努力成长静待花开 阅读(430) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Form类的Cursor属性 //获取或设置当鼠标指针位于窗体上时显示的光标 public virtual Currsor Cursor {get; set;} 实现代码: 阅读全文

posted @ 2019-01-17 11:38 努力成长静待花开 阅读(461) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: API函数 GetSystemMetrics //返回与WINDOWS环境有关的信息 实现代码: 阅读全文

posted @ 2019-01-17 11:08 努力成长静待花开 阅读(141) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: API函数 GetDoubleClickTime //判断连续两次鼠标单击之间会被处理成双击事件的时间间隔 单位毫秒 实现代码: 阅读全文

posted @ 2019-01-17 09:30 努力成长静待花开 阅读(1936) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页