unit AudreyMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ShellApi, IniFiles, MMSYSTEM, ExtCtrls;
type
TForm2 =
class(TForm)
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Label3: TLabel;
Label4: TLabel;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Label5: TLabel;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
StatusBar1: TStatusBar;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
procedure Button1Click(Sender: TObject);
procedure Label2Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses NewAds, ABOUT;
{$R *.dfm}
//[...jede Menge Prozeduren...]
var
MyJoy: TJoyInfo;
ErrorResult: MMRESULT;
begin
ErrorResult := joyGetPos(joystickid1, @MyJoy);
if ErrorResult = JOYERR_NOERROR
then
begin
RadioButton1.Checked := (MyJoy.wbuttons
and joy_button1) > 0;
RadioButton2.Checked := (MyJoy.wbuttons
and joy_button2) > 0;
if RadioButton1.Checked = True
Then
begin
//BUTTON 1 gedrückt
end
else
begin
//Zurücksetzen
end;
if RadioButton2.Checked = True
Then
begin
//BUTTON 2 gedrückt
end
else
//Und zurück
end
else
case ErrorResult
of
MMSYSERR_NODRIVER: ShowMessage('
Kein Joystick Treiber installiert.');
MMSYSERR_INVALPARAM: ShowMessage('
Falsche Joystick Paramameter.');
JOYERR_UNPLUGGED: ShowMessage('
Joystick ist nicht angeschlossen.');
else
ShowMessage('
Unbekannter Fehler.');
end;
end.