现在快捷键的使用已经很频繁了.快捷键可以使我们的操作变得更简单,更快捷.如何给自己的按钮加一个快捷键呢. 如下图:我们希望给我们的参照按钮加一个快捷键CTR + F. 不要以为在按钮的标题上加上F就行了,这只是给用户看的. 我们需要实现它,实现它有两种方法.先说方法一. 我们可以这样想,我们截取用户的F按键,如果用户按了F按键的话,判断一下ctr键是否被按下,如果被按下的话,说明用户按了CTR + F ,然后我们去调相应的按钮事件就可以了. 我们需要覆写CDialog类的 Pre
Win32API.cs using System;using System.Drawing;using System.Runtime.InteropServices;using Lordal.Window.Form.Lib.General;using Lordal.Window.Form.Lib.Win32; namespace Lordeo.Framework{ /// /// Windows API Functions /// public class Win32API { #regio
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace WindowsAPI { class CSharp_Win32Api { #region User32.dll 函数 /// <summary> /// 该函数检索一指定窗口的客户区域或整个屏幕的显示设备上下文环境的句柄,以后可以
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As IntegerPrivate Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As IntegerPublic chongfu As Integer Private Sub Timer1_Timer() Timer1.Inte