利用热键控制鼠标移动的一个程序
procedure TForm1.FormDestroy(Sender: TObject);
begin
btnUnsetHK.Click;
end;
end.
--------------------------------------------------------------------------------
这是dfm文件
object Form1: TForm1
Left = 296
Top = 238
AutoSize = True
BorderStyle = bsDialog
BorderWidth = 8
Caption = '模拟鼠标拖动'
ClientHeight = 265
ClientWidth = 211
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = '新宋体'
Font.Style = []
OldCreateOrder = False
OnDestroy = FormDestroy
PixelsPerInch = 96
TextHeight = 12
object btnSetHK: TButton
Left = 136
Top = 8
Width = 75
Height = 25
Caption = '设置热键(&H)'
TabOrder = 0
OnClick = btnSetHKClick
end
object btnExit: TButton
Left = 136
Top = 72
Width = 75
Height = 25
Caption = '退出(&X)'
TabOrder = 2
OnClick = btnExitClick
end
object GroupBox2: TGroupBox
Left = 0
Top = 0
Width = 129
Height = 97
Caption = '目的坐标'
TabOrder = 3
object Label3: TLabel
Left = 16
Top = 29
Width = 6
Height = 12
Caption = 'X'
end
object Label4: TLabel
Left = 16
Top = 61
Width = 6
Height = 12
Caption = 'Y'
end
object edXPos: TMaskEdit
Left = 32
Top = 24
Width = 73
Height = 20
EditMask = '0000;1;_'
MaxLength = 4
TabOrder = 0
Text = '0000'
end
object edYPos: TMaskEdit
Left = 32
Top = 56
Width = 73
Height = 20
EditMask = '0000;1;_'
MaxLength = 4
TabOrder = 1
Text = '0000'
end
end
object btnUnsetHK: TButton
Left = 136
Top = 40
Width = 75
Height = 25
Caption = '取消热键(&U)'
TabOrder = 1
OnClick = btnUnsetHKClick
end
object Memo: TMemo
Left = 0
Top = 104
Width = 209
Height = 161
TabOrder = 4
end
end
- 上一篇:在应用程序中跟踪MOUSE的坐标
- 下一篇:Delphi常用应用函数