111,129
社区成员
发帖
与我相关
我的任务
分享
string x = "k";
Keys Key = Keys.k;
//怎样实现Key=Keys.(x值)
// x="h";
// Key=Keys.h;
RegisterHotKey(this.Handle, 113, 3,Key); //注册热键
[DllImport("user32")]
public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint control, Keys vk);
int i = 3;
RegisterHotKey(this.Handle, 113, 3,Key); //怎样把3用i代替
[DllImport("user32")]
public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint control, Keys vk);
int i = 3;
RegisterHotKey(this.Handle, 113, 3,Key); //怎样把3用i代替
Keys i = (Keys)Enum.Parse(typeof(Keys), "K", true);
[Quote=引用 4 楼 cj205 的回复:]