?? frmmain.pas
字號:
unit frmMain;
//**************************************************************************
//
// 鼠標消息范例應用程序
// Inside VCL隨書范例
// grhunter@2003.10.15
//
//**************************************************************************
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
ListBox1: TListBox;
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure AddMouseMessage(sButtonName:String; ButtonX, ButtonY: Integer);
begin
ListBox1.Items.Add(Format('%s X:%d,Y:%d',[sButtonName,ButtonX, ButtonY]));
end;
begin
case Button of //
mbLeft: AddMouseMessage('鼠標左鍵',X,Y);
mbRight: AddMouseMessage('鼠標右鍵',X,Y);
mbMiddle: AddMouseMessage('鼠標中鍵',X,Y);
end; // case
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -