2020国产成人精品视频,性做久久久久久久久,亚洲国产成人久久综合一区,亚洲影院天堂中文av色

分享

注冊(cè)系統(tǒng)級(jí)熱鍵

 獨(dú)孤求財(cái) 2012-03-30
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    procedure WMHotKey(var Msg: TWMHotKey); message WM_HOTKEY;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

var
  HotKeyId: array[0..12] of Integer;  //熱鍵數(shù)組, 這里準(zhǔn)備定義 13 個(gè)熱鍵

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  //注冊(cè)熱鍵
  for i := Low(HotKeyId) to High(HotKeyId) do
    HotKeyId[i] := GlobalAddAtom(PChar(IntToStr(i)));  //熱鍵命名可隨意
  RegisterHotKey(Handle,HotKeyId[0],0,VK_F2);                //F2
  RegisterHotKey(Handle,HotKeyId[1],0,VK_UP);                //Up
  RegisterHotKey(Handle,HotKeyId[2],0,VK_DOWN);              //Down
  RegisterHotKey(Handle,HotKeyId[3],0,VK_LEFT);              //Left
  RegisterHotKey(Handle,HotKeyId[4],0,VK_RIGHT);             //Right
  RegisterHotKey(Handle,HotKeyId[5],0,VK_PRIOR);             //PageUp
  RegisterHotKey(Handle,HotKeyId[6],0,VK_NEXT);              //PageDown
  RegisterHotKey(Handle,HotKeyId[7],0,VK_OEM_PLUS);          //+
  RegisterHotKey(Handle,HotKeyId[8],0,VK_OEM_MINUS);         //-
  RegisterHotKey(Handle,HotKeyId[9],0,$31);                  //1
  RegisterHotKey(Handle,HotKeyId[10],0,$41);                 //a
  RegisterHotKey(Handle,HotKeyId[11],0,VK_RETURN);           //Enter
  RegisterHotKey(Handle,HotKeyId[12],MOD_CONTROL,VK_RETURN); //Ctrl+Enter
end;

//熱鍵
procedure TForm1.WMHotKey(var Msg: TWMHotKey);
begin
  if Msg.HotKey = HotKeyId[0] then ShowMessage('F2');
  if (Msg.HotKey=HotKeyId[1]) then ShowMessage('Up');
  if (Msg.HotKey=HotKeyId[2]) then ShowMessage('Down');
  if (Msg.HotKey=HotKeyId[3]) then ShowMessage('Left');
  if (Msg.HotKey=HotKeyId[4]) then ShowMessage('Right');
  if Msg.HotKey = HotKeyId[5] then ShowMessage('PageUp');
  if Msg.HotKey = HotKeyId[6] then ShowMessage('PageDown');
  if Msg.HotKey = HotKeyId[7] then ShowMessage('+');
  if Msg.HotKey = HotKeyId[8] then ShowMessage('-');
  if Msg.HotKey = HotKeyId[9] then ShowMessage('1');
  if Msg.HotKey = HotKeyId[10] then ShowMessage('a');
  if Msg.HotKey = HotKeyId[11] then ShowMessage('Enter');
  if Msg.HotKey = HotKeyId[12] then ShowMessage('Ctrl+Enter');
end;

procedure TForm1.FormDestroy(Sender: TObject);
var
  i: Integer;
begin
  //注銷(xiāo)熱鍵
  for i := Low(HotKeyId) to High(HotKeyId) do
  begin
    UnRegisterHotKey(handle,HotKeyId[i]);
    GlobalDeleteAtom(HotKeyId[i]);
  end;
end;

end.

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多