procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_DELETE then
//
end;
—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Desire := '加不加分随你';
—————————————————————————————————
Shift: TShiftState);
begin
if Key = VK_DELETE then
//
end;
—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Desire := '加不加分随你';
—————————————————————————————————
解决方案 »
- delphi漏洞 pos()函数的奇怪现象
- 什么叫CMM?
- 有没有Delphi使用SQL数据库,修改查询SQL数据库内容的程序代码?我是初学者.
- 怎样实现在安装程序过程中,自动添加一个ODBC的数据源?
- 系统函数Time的返回值不能拿来跟DateTimePicker1.time比较?
- 请熟悉dbExpressd的进来留个名,希望今后可以常联系。
- 如何使TDateTimePicker 弹出日历界面
- 动态创建的菜单,如何判断 点击的是哪个条目
- 求助,delphi 5中stringgrid组件是否支持多行选择?如果能,请问怎么设置其属性阿?
- 你好!帮帮我
- 用哪个函数可以模拟键盘组合按键???
- windows 下面的paradox密码
interface
uses
Windows, Messages, shellapi,SysUtils, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure MyProcedure(var Msg: TMsg; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.MyProcedure(var Msg: TMsg; var Handled: Boolean);
begin
if msg.message=WM_KEYDOWN then
if msg.wParam=VK_DELETE then
showmessage('Press Del!');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMessage:=MyProcedure;
end;
end.
================================================================
充电中...
Procedure TForm1.WinMsg (Var Msg : TMsg; Var Handled : Boolean);
Begin
if (Msg.message<>15)and(Msg.message<>17)and(Msg.message<>512)
and(Msg.message<>160)and(Msg.message<>513)and(Msg.message<>280) then
memo1.Text := memo1.Text +'#'+ inttostr(Msg.Message);
If Msg.Message = WM_SYSCOMMAND Then begin
Beep;
Application.MessageBox( 'OK!', '操作提示', MB_OK + MB_ICONINFORMATION );
end;
{ 接收到消息时的通知}
if msg.message = SC_MOUSEMENU then
Application.MessageBox( 'mouseOK!', '操作提示', MB_OK + MB_ICONINFORMATION );
if msg.message = 516 then begin//鼠标移动
msg.message := 0;
// Application.MessageBox( 'mouseOK!', '操作提示', MB_OK + MB_ICONINFORMATION );
end;
End;procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage := WinMsg;
end;
它明确的说要捕获del 发向建得在onkeydown or onkeyup