在主窗口的keydown中写下
if (key=vk_f12) then
form_main.N50Click(self);
不能执行。
为什么,如何做。谢谢
if (key=vk_f12) then
form_main.N50Click(self);
不能执行。
为什么,如何做。谢谢
解决方案 »
- 请问这个sql插入语句为什么会报错呢
- 封面窗体如何暂停呢????????????
- 数据结构
- 知道传奇3.0的的进来,我有服务器端的BCB代码
- 我能把自己写的应用程序内嵌到word里去吗?如果能应该如何实现???在线等待!
- 动态生成一个对象后,就如个空壳,请教如何动态为其写事件代码?
- 求助,很急!
- 在Delhi用BatchMove将.DBF导入SQL Server中,当我用BatAppendUpdate时,它为什么总是提示我没有索引??在线等待......
- 现手上有一道路收费系统的单,愿意转让给你。
- 请教各位高手如何操纵扫描仪
- 请问各位怎么才能快速找到begin和end的对应关系呀?
- 如何用EXCEL进行取数,请帮忙,大吓!
例子,按大写A键显示‘Hello,World!’。*****************************************************************
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
//procedure mykeydown(var message:twmkey);message wm_keydown;
procedure AppMessage(var Msg: TMsg; var Handled: Boolean); public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMessage:=appmessage;
end;procedure tform1.AppMessage(var Msg: TMsg; var Handled: Boolean);begin
if msg.message=wm_keydown then
if msg.wParam=65 then
begin
//showmessage(inttostr(msg.wparam));
showmessage('Hello,World!');
handled:=true;
end;
end;end.
1.
建立一个Action(用TActionList控件),将他的shortcut设置为f12,
2.将菜单的action设为上面建立的action
3.
将你原来才菜单项中执行的代码拷贝到actionExcute事件中(此事件双击该action就可以生成框架