unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TFmMain = class(TForm)
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure WMHOTKEY(var Msg:TWMHOTKEY); message WM_HOTKEY;
public
{ Public declarations }
HotKey_F06_ID:Integer;
end;var
FmMain: TFmMain;implementation{$R *.DFM}procedure TFmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotKey(FmMain.Handle,HotKey_F06_ID);
GlobalDeleteAtom(HotKey_F06_ID);
end;procedure TFmMain.FormCreate(Sender: TObject);
begin
HotKey_F06_ID:=GlobalAddAtom('_Global_HotKey_F06_ID_')-$C000;
//1,就vk_f6不行,其它都行
RegisterHotKey(FmMain.Handle,HotKey_F06_ID,0,vk_f6);//VK_f6=>vk_f10 oK
end;procedure TFmMain.WMHOTKEY(var Msg: TWMHOTKEY);
begin
if Msg.HotKey=HotKey_F06_ID then
Begin ShowMessage('F6');
end;
end;RegisterHotKey註冊系統熱鍵
就vk_f6不行,其它都行,
有甚麼辦法解決
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TFmMain = class(TForm)
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure WMHOTKEY(var Msg:TWMHOTKEY); message WM_HOTKEY;
public
{ Public declarations }
HotKey_F06_ID:Integer;
end;var
FmMain: TFmMain;implementation{$R *.DFM}procedure TFmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotKey(FmMain.Handle,HotKey_F06_ID);
GlobalDeleteAtom(HotKey_F06_ID);
end;procedure TFmMain.FormCreate(Sender: TObject);
begin
HotKey_F06_ID:=GlobalAddAtom('_Global_HotKey_F06_ID_')-$C000;
//1,就vk_f6不行,其它都行
RegisterHotKey(FmMain.Handle,HotKey_F06_ID,0,vk_f6);//VK_f6=>vk_f10 oK
end;procedure TFmMain.WMHOTKEY(var Msg: TWMHOTKEY);
begin
if Msg.HotKey=HotKey_F06_ID then
Begin ShowMessage('F6');
end;
end;RegisterHotKey註冊系統熱鍵
就vk_f6不行,其它都行,
有甚麼辦法解決
解决方案 »
- delphi做这样的网页该用什么思路呢
- 树型控件treeview与数据库
- 请教一个问题,调用一个c语言中的函数,在delphi中该怎么定义?
- ADOConnection的设置问题
- ★ 软件产品登记 与 软件著作权登记 有什么区别???其各自作用是什么???行业协会网站上什么都没有!!
- Delphi不能使用SHGetSpecialFolderPath的API?
- 请问各位delphi7.0中的报表组件在哪啊,我怎么找不到啊?
- 哪位有没有做过本地邮箱收发程序?
- listview中显示为4294382385,我想把它转换为integer型该怎么办?
- 听说borland公司的开发环境领先MS十年,是吗?
- 数据集并集的问题
- 郁闷!散分......
可能是和那個軟件有衝突
謝謝各位
//注册成功了
else 注册不成功,可以写点提示信息或是showmessage