unit Unit2;
interface
uses
Winapi.Windows,
Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics,
Vcl.Controls,
Vcl.Forms,
Vcl.Dialogs,
Vcl.StdCtrls,
Vcl.ExtCtrls,
Vcl.Buttons;
type
TForm2 =
class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Label1: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Button1: TButton;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
BitBtn5: TBitBtn;
BitBtn6: TBitBtn;
BitBtn7: TBitBtn;
BitBtn8: TBitBtn;
BitBtn9: TBitBtn;
BitBtn10: TBitBtn;
Panel3: TPanel;
BitBtn11: TBitBtn;
BitBtn12: TBitBtn;
BitBtn13: TBitBtn;
BitBtn14: TBitBtn;
BitBtn15: TBitBtn;
BitBtn16: TBitBtn;
BitBtn17: TBitBtn;
BitBtn18: TBitBtn;
BitBtn19: TBitBtn;
BitBtn20: TBitBtn;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure BitBtn2MouseEnter(Sender: TObject);
procedure BitBtn1MouseEnter(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.BitBtn1MouseEnter(Sender: TObject);
begin
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Label1.Tag:= Label1.Tag -1;
if Label1.Tag<0
then Label1.Tag:=0;
Label1.Caption:= INTTOSTR(Label1.tag);
Application.ProcessMessages;
winapi.windows.Beep(1500,20);
end;
procedure TForm2.BitBtn2MouseEnter(Sender: TObject);
begin
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Label1.Tag:= Label1.Tag +1;
if Label1.Tag>255
then Label1.Tag:=255;
Label1.Caption:= INTTOSTR(Label1.tag);
Application.ProcessMessages;
winapi.windows.Beep(2000,20);
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Label1.Tag:=127;
Label1.Caption:= INTTOSTR(Label1.tag);
end;
end.