unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, MPlayer, ShellApi, AppEvnts, MmSystem , jpeg;
const
IC_CLICK = WM_APP + 201;
type
TForm1 =
class(TForm)
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
OpenDialog1: TOpenDialog;
MediaPlayer1: TMediaPlayer;
Image6: TImage;
Label2: TLabel;
Label1: TLabel;
Timer1: TTimer;
Image7: TImage;
Image8: TImage;
Image9: TImage;
Label3: TLabel;
Image10: TImage;
Timer2: TTimer;
Timer3: TTimer;
Image11: TImage;
Image12: TImage;
Image13: TImage;
Timer4: TTimer;
Label4: TLabel;
Timer6: TTimer;
Image14: TImage;
Image15: TImage;
Image16: TImage;
Image17: TImage;
procedure Image2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image2Click(Sender: TObject);
procedure Image3MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image3MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image3Click(Sender: TObject);
procedure Image5MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image5MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
procedure Image5Click(Sender: TObject);
procedure Image4MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image4MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image4Click(Sender: TObject);
procedure OpenDialog1CanClose(Sender: TObject;
var CanClose: Boolean);
procedure Timer1Timer(Sender: TObject);
procedure MTimeToZeiten(Sender: TObject);
procedure Image6MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image7MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image7MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image7Click(Sender: TObject);
procedure Image8MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image8MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image8Click(Sender: TObject);
procedure Image9MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image9MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image9Click(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure Image12Click(Sender: TObject);
procedure Image13Click(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure Image4MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Timer6Timer(Sender: TObject);
procedure Image12MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image13MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image7MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image8MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image9MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image5MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image14Click(Sender: TObject);
procedure Image15MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image15MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image16MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image16MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image16Click(Sender: TObject);
procedure Image15Click(Sender: TObject);
procedure Image15MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image17MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image17MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Image17MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image17Click(Sender: TObject);
procedure Image10Click(Sender: TObject);
private
{ Private declarations }
procedure Systray(
var sMsg: TMessage);
message IC_CLICK;
procedure ApplicationEvents1Minimize(Sender: TObject);
public
{ Public declarations }
PlaylisteOn: Boolean;
InfoText:
String;
end;
var
Form1: TForm1;
NIM : TNotifyIconData;
AltX, AltY: Integer;
MoveForm: Boolean;
CursorPos: TPoint;
AppOrdner:
String;
iInfoText: Integer;
i2InfoText: Integer;
InfoTextOK: Boolean;
i1: Integer;
TrackRepeat, TrackZeit, Info: Boolean;
ihour, imin, isec, iTime: Integer;
shour, smin, ssec:
String;
implementation
uses Unit2;
{$R *.dfm}
//Formular wird erstellt
procedure TForm1.FormCreate(Sender: TObject);
var c: Char;
i1: Integer;
action: Boolean;
begin
//Ordner in der die Anwendung steckt wird gespeichert
AppOrdner := Application.ExeName;
i1 := Length(AppOrdner);
action := false;
repeat
c := AppOrdner[i1];
if (c = '
\')
or (c = '
/')
then
begin
AppOrdner := Copy(AppOrdner,1,i1);
action := True;
end;
i1 := i1 - 1;
until action = True;
//Weiteres
Form1.Label4.Caption := '
';
//Bilder laden
Form1.Image1.Picture.LoadFromFile(AppOrdner+'
./daten/hintergrund2.bmp');
Form1.Image2.Picture.LoadFromFile(AppOrdner+'
./daten/close0.bmp');
Form1.Image3.Picture.LoadFromFile(AppOrdner+'
./daten/mini0.bmp');
Form1.Image4.Picture.LoadFromFile(AppOrdner+'
./daten/add0.bmp');
Form1.Image5.Picture.LoadFromFile(AppOrdner+'
./daten/tray0.bmp');
Form1.Image7.Picture.LoadFromFile(AppOrdner+'
./daten/play0.bmp');
Form1.Image8.Picture.LoadFromFile(AppOrdner+'
./daten/pause0.bmp');
Form1.Image9.Picture.LoadFromFile(AppOrdner+'
./daten/stop0.bmp');
Form1.Image12.Picture.LoadFromFile(AppOrdner+'
./daten/repeat0.bmp');
Form1.Image13.Picture.LoadFromFile(AppOrdner+'
./daten/time0.bmp');
Form1.Image14.Picture.LoadFromFile(AppOrdner+'
./daten/info0.bmp');
Form1.Image15.Picture.LoadFromFile(AppOrdner+'
./daten/up0.bmp');
Form1.Image16.Picture.LoadFromFile(AppOrdner+'
./daten/down0.bmp');
Form1.Image17.Picture.LoadFromFile(AppOrdner+'
./daten/right0.bmp');
end;
//Umwandlung von den Zeiten
procedure TForm1.MTimeToZeiten(Sender: TObject);
begin
isec := iTime
div 1000;
imin := iTime
div 60000;
ihour := iTime
div 3600000;
imin := imin-(ihour*60);
isec := isec-((imin*60)+(ihour*3600));
if Length(IntToStr(isec)) = 1
then ssec := '
0'+IntToStr(isec)
else ssec := IntToStr(isec);
if Length(IntToStr(imin)) = 1
then smin := '
0'+IntToStr(imin)
else smin := IntToStr(imin);
if Length(IntToStr(ihour)) = 1
then shour := '
0'+IntToStr(ihour)
else shour := IntToStr(ihour);
end;
//Applikation verschieben
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
AltX := X;
AltY := Y;
MoveForm := True;
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if MoveForm = True
then begin
GetCursorPos(CursorPos);
Form1.Left := CursorPos.X - AltX; Form1.Top := CursorPos.Y - AltY;
Form2.Left := Form1.Left+Form1.Width;
Form2.Top := Form1.Top+11;
end;
Form1.Timer6Timer(Sender);
end;
procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MoveForm := False;
end;
//Programm schliessen
procedure TForm1.Image2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image2.Picture.LoadFromFile(AppOrdner+'
./daten/close1.bmp');
end;
procedure TForm1.Image2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image2.Picture.LoadFromFile(AppOrdner+'
./daten/close0.bmp');
end;
procedure TForm1.Image2Click(Sender: TObject);
begin
Form1.Close;
end;
//Programm minimieren
procedure TForm1.Image3MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image3.Picture.LoadFromFile(AppOrdner+'
./daten/mini1.bmp');
end;
procedure TForm1.Image3MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image3.Picture.LoadFromFile(AppOrdner+'
./daten/mini0.bmp');
end;
procedure TForm1.Image3Click(Sender: TObject);
begin
Application.Minimize;
end;
//Programm in den Tray minimieren
procedure TForm1.Image5MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image5.Picture.LoadFromFile(AppOrdner+'
./daten/tray1.bmp');
end;
procedure TForm1.Image5MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image5.Picture.LoadFromFile(AppOrdner+'
./daten/tray0.bmp');
end;
procedure TForm1.Image5Click(Sender: TObject);
begin
Form2.Visible := False;
Form1.Image17.Visible := True;
ApplicationEvents1Minimize(Sender);
end;
procedure TForm1.Systray(
var sMsg: TMessage);
begin
// Vorgang: Klick auf das Icon neben der Uhr und Anzeige der Anwendung
inherited;
if (sMsg.LParam = WM_LBUTTONDOWN)
then begin
Show;
Shell_NotifyIcon(NIM_DELETE, @NIM);
Application.Restore;
//zeigt die Anwendung wieder an
end;
end;
procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
//Vorgang: Minimieren der Anwendung, Entfernung des Taskleisteneintrags
//und Hinzufügen des Programmicons neben der Uhr
Form1.FormStyle:=fsStayOnTop;
Hide;
with NIM
do begin
cbSize := SizeOf (nIM);
Wnd :=
Handle;
uID := 0;
uFlags := NIF_ICON
or NIF_MESSAGE
or NIF_TIP;
uCallbackMessage := IC_CLICK;
hIcon := Application.Icon.Handle;
szTip := '
Marcs Player';
end;
Shell_NotifyIcon(NIM_ADD, @NIM);
end;
//Programm verkleinern
procedure TForm1.Image15MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image15.Picture.LoadFromFile(AppOrdner+'
./daten/up1.bmp');
end;
procedure TForm1.Image15MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image15.Picture.LoadFromFile(AppOrdner+'
./daten/up0.bmp');
end;
procedure TForm1.Image15Click(Sender: TObject);
begin
Form1.Height := 36;
Form1.Image16.Visible := True;
Form2.Visible := False;
Form1.Image17.Visible := True;
end;
//Programm vergrößern
procedure TForm1.Image16MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image16.Picture.LoadFromFile(AppOrdner+'
./daten/down1.bmp');
end;
procedure TForm1.Image16MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image16.Picture.LoadFromFile(AppOrdner+'
./daten/down0.bmp');
end;
procedure TForm1.Image16Click(Sender: TObject);
begin
Form1.Height := 305;
Form1.Image16.Visible := false;
end;
//Track laden
procedure TForm1.Image4MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image4.Picture.LoadFromFile(AppOrdner+'
./daten/add1.bmp');
end;
procedure TForm1.Image4MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image4.Picture.LoadFromFile(AppOrdner+'
./daten/add0.bmp');
end;
procedure TForm1.Image4Click(Sender: TObject);
begin
Form1.OpenDialog1.Execute;
end;
procedure TForm1.OpenDialog1CanClose(Sender: TObject;
var CanClose: Boolean);
begin
Form1.MediaPlayer1.FileName := Form1.OpenDialog1.FileName;
Form1.MediaPlayer1.Open;
Form1.MediaPlayer1.Play;
Form1.Timer1.Enabled := True;
Form1.Label1.Visible := True;
Form1.Label2.Visible := True;
Form1.Image6.Visible := True;
Form1.Image7.Enabled := False;
Form1.Image8.Enabled := True;
Form1.Image9.Enabled := True;
iTime := Form1.MediaPlayer1.Length;
Form1.MTimeToZeiten(Sender);
Form1.Label1.Caption := shour+'
:'+smin+'
:'+ssec;
Form1.Timer1Timer(Sender);
i1 := 0;
Form1.Timer2.Enabled := True;
Form1.Timer2Timer(Sender);
Form1.Image13.Enabled := True;
end;
//Aktuelle Zeiten ausgeben (Timer1)
procedure TForm1.Timer1Timer(Sender: TObject);
begin
//Zeit ausgeben
if TrackZeit = True
then iTime := Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position
else iTime := Form1.MediaPlayer1.Position;
Form1.MTimeToZeiten(Sender);
Form1.Label2.Caption := shour+'
:'+smin+'
:'+ssec;
//Fortschrittsbalken aktualisieren
Form1.Image6.Canvas.Brush.Color := clSkyBlue;
Form1.Image6.Canvas.Pen.Color := clBlue;
Form1.Image6.Canvas.Rectangle(-1,-1,Form1.Image6.Width+1,Form1.Image6.Height+1);
Form1.Image6.Canvas.Brush.Color := clNavy;
Form1.Image6.Canvas.Pen.Color := clBlue;
Form1.Image6.Canvas.Rectangle(-1,-1,(Form1.MediaPlayer1.Position * (Form1.Image6.Width+1))
div Form1.MediaPlayer1.Length,Form1.Image6.Height+2);
//Weitere Aktionen die bei bestimmter Zeit ausgelöst werden
//Automatisch zurückspulen
if Form1.MediaPlayer1.Length = Form1.MediaPlayer1.Position
then
begin
if TrackRepeat = True
then Form1.Image7Click(Sender)
else if PlaylisteOn = True
then Form2.NextTrack(Sender)
else Form1.Image9Click(Sender);
end;
//Countdown
if (Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position < 4000)
and (Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position > 3000)
then
Form1.Image11.Picture.LoadFromFile(AppOrdner+'
./daten/Zahl3.bmp')
else if (Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position < 3000)
and (Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position > 2000)
then
Form1.Image11.Picture.LoadFromFile(AppOrdner+'
./daten/Zahl2.bmp')
else if (Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position < 2000)
and (Form1.MediaPlayer1.Length - Form1.MediaPlayer1.Position > 1000)
then
Form1.Image11.Picture.LoadFromFile(AppOrdner+'
./daten/Zahl1.bmp')
else Form1.Image11.Picture.LoadFromFile(AppOrdner+'
./daten/Nichts.bmp');
end;
//Klick auf Fortschrittsbalken
procedure TForm1.Image6MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.MediaPlayer1.Position := (X * Form1.MediaPlayer1.Length)
div Form1.Image6.Width+1;
Form1.MediaPlayer1.Play;
Form1.Timer1Timer(Sender);
Form1.Image7.Enabled := False;
Form1.Image8.Enabled := True;
Form1.Image9.Enabled := True;
i1 := 0;
Form1.Timer2.Enabled := True;
Form1.Timer2Timer(Sender);
end;
//Track auf Play
procedure TForm1.Image7MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image7.Picture.LoadFromFile(AppOrdner+'
./daten/play1.bmp');
end;
procedure TForm1.Image7MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image7.Picture.LoadFromFile(AppOrdner+'
./daten/play0.bmp');
end;
procedure TForm1.Image7Click(Sender: TObject);
begin
Form1.Image7.Enabled := False;
Form1.Image8.Enabled := True;
Form1.Image9.Enabled := True;
Form1.Label1.Visible := True;
Form1.Label2.Visible := True;
Form1.Image6.Visible := True;
Form1.MediaPlayer1.Play;
i1 := 0;
Form1.Timer2.Enabled := True;
Form1.Timer2Timer(Sender);
end;
//Track auf Pause
procedure TForm1.Image8MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image8.Picture.LoadFromFile(AppOrdner+'
./daten/pause1.bmp');
end;
procedure TForm1.Image8MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image8.Picture.LoadFromFile(AppOrdner+'
./daten/pause0.bmp');
end;
procedure TForm1.Image8Click(Sender: TObject);
begin
Form1.Image7.Enabled := True;
Form1.Image8.Enabled := False;
Form1.Image9.Enabled := True;
Form1.MediaPlayer1.Pause;
i1 := 0;
Form1.Timer3.Enabled := True;
Form1.Timer3Timer(Sender);
end;
//Track auf Stop
procedure TForm1.Image9MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image9.Picture.LoadFromFile(AppOrdner+'
./daten/stop1.bmp');
end;
procedure TForm1.Image9MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image9.Picture.LoadFromFile(AppOrdner+'
./daten/stop0.bmp');
end;
procedure TForm1.Image9Click(Sender: TObject);
begin
Form1.Image7.Enabled := True;
Form1.Image8.Enabled := False;
Form1.Image9.Enabled := False;
Form1.Label1.Visible := False;
Form1.Label2.Visible := False;
Form1.Image6.Visible := False;
Form1.MediaPlayer1.Stop;
Form1.MediaPlayer1.Rewind;
Form1.Timer2.Enabled := False;
Form1.Timer3.Enabled := False;
Form1.Image10.Picture.LoadFromFile(AppOrdner+'
./daten/Nichts.bmp');
end;
//Informationsanzeige ein und ausschalten
procedure TForm1.Image14Click(Sender: TObject);
begin
if Info = False
then
begin
Info := True;
Form1.Image14.Picture.LoadFromFile(AppOrdner+'
./daten/info1.bmp');
end else begin
Info := False;
Form1.Image14.Picture.LoadFromFile(AppOrdner+'
./daten/info0.bmp');
end;
end;
//Track auf Repeat
procedure TForm1.Image10Click(Sender: TObject);
begin
Form1.Image10.Picture.LoadFromFile ('
C:DokumenteundEinstellungen/MarcPhilliph/Desktop/Musik/Bilder/DSC00598.JPG');
end;
procedure TForm1.Image12Click(Sender: TObject);
begin
if TrackRepeat = False
then
begin
TrackRepeat := True;
Form1.Image12.Picture.LoadFromFile(AppOrdner+'
./daten/repeat1.bmp');
end else begin
TrackRepeat := False;
Form1.Image12.Picture.LoadFromFile(AppOrdner+'
./daten/repeat0.bmp');
end;
end;
//Trackzeit auf Restlich
procedure TForm1.Image13Click(Sender: TObject);
begin
if TrackZeit = False
then
begin
TrackZeit := True;
Form1.Image13.Picture.LoadFromFile(AppOrdner+'
./daten/time1.bmp');
end else begin
TrackZeit := False;
Form1.Image13.Picture.LoadFromFile(AppOrdner+'
./daten/time0.bmp');
end;
Form1.Timer1Timer(Sender);
end;
//Annimationen (Image10)
//Play
procedure TForm1.Timer2Timer(Sender: TObject);
begin
Form1.Timer3.Enabled := False;
Form1.Image10.Picture.LoadFromFile(AppOrdner+'
./daten/GrossPlay.bmp');
i1 := i1 + 1;
if i1 = 5
then
begin
i1 := 0;
Form1.Image10.Picture.LoadFromFile(AppOrdner+'
./daten/Nichts.bmp');
Form1.Timer2.Enabled := False;
end;
end;
//Pause
procedure TForm1.Timer3Timer(Sender: TObject);
begin
Form1.Timer2.Enabled := False;
Form1.Image10.Picture.LoadFromFile(AppOrdner+'
./daten/GrossPause.bmp');
i1 := i1 + 1;
if i1 = 2
then
begin
i1 := 0;
Form1.Image10.Picture.LoadFromFile(AppOrdner+'
./daten/Nichts.bmp');
end;
end;
//Informationen anzeigen
procedure TForm1.Image4MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Track laden';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image12MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if TrackRepeat = True
then InfoText := '
Repeat ausschalten'
else InfoText := '
Repeat einschalten';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image13MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if TrackZeit = True
then InfoText := '
Abgelaufene Zeit anzeigen'
else InfoText := '
Restliche Zeit anzeigen';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image7MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Track starten';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image8MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Track pausieren';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image9MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Track stoppen';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image5MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Anwendung in den Tray minimieren';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Anwendung minimieren';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Anwendung beenden';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image15MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Anwendung verkleinern';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Image17MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
InfoText := '
Playliste öffnen';
Form1.Timer4.Enabled := True;
end;
procedure TForm1.Timer6Timer(Sender: TObject);
begin
//Wartet, und löscht Label4
Form1.Label4.Caption := '
';
InfoText := '
';
Form1.Timer6.Enabled := False;
end;
procedure TForm1.Timer4Timer(Sender: TObject);
begin
//Zeigt das an, was in der InfoText Variable steht
if Info = True
then
begin
if iInfoText = 0
then begin
Form1.Timer4.Interval := 10;
iInfoText := 1;
i2InfoText := 1;
end else if iInfoText = 1
then begin
if i2InfoText < Length(InfoText)+1
then begin
Form1.Label4.Caption := Copy(InfoText,1,i2InfoText);
i2InfoText := i2InfoText + 1;
end else iInfoText := 2;
end else if iInfoText = 2
then begin
iInfoText := 0;
Form1.Timer4.Interval := 1;
Form1.Timer4.Enabled := False;
Form1.Timer6.Enabled := True;
end;
end;
end;
//Playliste
//Playliste Formular öffnen und schließen
procedure TForm1.Image17MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image17.Picture.LoadFromFile(AppOrdner+'
./daten/right1.bmp');
end;
procedure TForm1.Image17MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Form1.Image17.Picture.LoadFromFile(AppOrdner+'
./daten/right0.bmp');
end;
procedure TForm1.Image17Click(Sender: TObject);
begin
Form1.Image17.Visible := False;
Form2.Erstellen(Sender);
end;
end.