函数a("这里的参数是个键名,比如说alt键为例")
{
}
例:
API部分:Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal Scan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
窗体中的代码:
Call keybd_event(112, 0, 0, 0) ‘ 那个112为F1的ASCII值
有朋友感兴趣可以找一下组合键的ascii码值,也给我一份,我没有找到.如:Ctrl+a,Shift+s.....等
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsApplication6
{
}
注:F1-F10 的ascii码值从112-121