Kodbank İndir

! CODEBANK 2012 !

İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.

ÖNEMLİ AÇIKLAMA: MUTLAKA OKUYUNUZ!

Gönderen Konu: cLaW MP3 Player V1.5 Kaynak Kodu  (Okunma sayısı 3600 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı cLaW

  • Kıdemli Üye
  • *****
  • İleti: 351
  • Rep: +3/-0
  • Cinsiyet: Bay
    • CMP
cLaW MP3 Player V1.5 Kaynak Kodu
« : 25 Nisan 2008 14:37:28 »
Kod: Delphi
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   ShellApi, Registry, ActiveX, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7.   Dialogs, Buttons, MPlayer, sBitBtn, StdCtrls, sButton, sSkinProvider, sSkinManager,
  8.   ExtCtrls, sScrollBar, sLabel, sAlphaListBox, Gauges, ComCtrls, IBCtrls,
  9.   TabNotBk, DBCtrls, OleServer, AccessXP, Menus, Grids,
  10.   DirOutln, mmsystem, CommCtrl, ShlObj, sPanel, sCheckBox, sGauge, ImgList;
  11.  
  12. type
  13.   TForm1 = class(TForm)
  14.     sSkinManager1: TsSkinManager;
  15.     sSkinProvider1: TsSkinProvider;
  16.     sButton1: TsButton;
  17.     sButton2: TsButton;
  18.     sButton3: TsButton;
  19.     sButton4: TsButton;
  20.     sBitBtn1: TsBitBtn;
  21.     OpenDialog1: TOpenDialog;
  22.     MediaPlayer1: TMediaPlayer;
  23.     tr: TsScrollBar;
  24.     Timer1: TTimer;
  25.     sLabel1: TsLabel;
  26.     sLabel2: TsLabel;
  27.     ListBox1: TsListBox;
  28.     ListBox2: TsListBox;
  29.     sButton5: TsButton;
  30.     OpenDialog2: TOpenDialog;
  31.     tr2: TsScrollBar;
  32.     sLabel3: TsLabel;
  33.     sLabel4: TsLabel;
  34.     Timer2: TTimer;
  35.     sButton8: TsButton;
  36.     MainMenu1: TMainMenu;
  37.     Ayarlar1: TMenuItem;
  38.     MP3Se1: TMenuItem;
  39.     Oynat1: TMenuItem;
  40.     Duraklar1: TMenuItem;
  41.     Durdur1: TMenuItem;
  42.     Kapat1: TMenuItem;
  43.     ListeyeMP3Al1: TMenuItem;
  44.     Hakknda1: TMenuItem;
  45.     SkinSe1: TMenuItem;
  46.     Skinler1: TMenuItem;
  47.     MaviGzellik1: TMenuItem;
  48.     McOS1: TMenuItem;
  49.     sButton9: TsButton;
  50.     sLabel6: TsLabel;
  51.     sLabel7: TsLabel;
  52.     sLabel8: TsLabel;
  53.     Koyu1: TMenuItem;
  54.     Vsta1: TMenuItem;
  55.     sPanel1: TsPanel;
  56.     OpenDialog3: TOpenDialog;
  57.     rep: TsButton;
  58.     Timer4: TTimer;
  59.     norep: TsButton;
  60.     sLabel9: TsLabel;
  61.     pp: TTimer;
  62.     p6: TProgressBar;
  63.     p5: TProgressBar;
  64.     p4: TProgressBar;
  65.     p3: TProgressBar;
  66.     p2: TProgressBar;
  67.     p1: TProgressBar;
  68.     p9: TProgressBar;
  69.     p8: TProgressBar;
  70.     p7: TProgressBar;
  71.     pp2: TTimer;
  72.     dd: TTimer;
  73.     Mavi1: TMenuItem;
  74.     Buz1: TMenuItem;
  75.     Elegant1: TMenuItem;
  76.     DoalSkin41: TMenuItem;
  77.     NextAlphaSkin1: TMenuItem;
  78.     YeilDizayn1: TMenuItem;
  79.     sButton10: TsButton;
  80.     Label4: TsLabel;
  81.     sLabel10: TsLabel;
  82.     sLabel11: TsLabel;
  83.     Label2: TsLabel;
  84.     Label3: TsLabel;
  85.     listrep: TTimer;
  86.     sButton11: TsButton;
  87.     sButton12: TsButton;
  88.     Yardm1: TMenuItem;
  89.     KsayolTular1: TMenuItem;
  90.     sButton13: TsButton;
  91.     sButton14: TsButton;
  92.     Timer3: TTimer;
  93.     sButton15: TsButton;
  94.     SaveDialog1: TSaveDialog;
  95.     SaveDialog2: TSaveDialog;
  96.     asd: TTimer;
  97.     Timer5: TTimer;
  98.     Timer6: TTimer;
  99.     denet: TTimer;
  100.     Timer8: TTimer;
  101.     sLabel5: TsLabel;
  102.     sLabel12: TsLabel;
  103.     sButton7: TsBitBtn;
  104.     sButton6: TsBitBtn;
  105.     MiniOynatcyaGe1: TMenuItem;
  106.     procedure sButton1Click(Sender: TObject);
  107.     procedure sBitBtn1Click(Sender: TObject);
  108.     procedure sButton3Click(Sender: TObject);
  109.     procedure sButton2Click(Sender: TObject);
  110.     procedure sButton4Click(Sender: TObject);
  111.     procedure Timer1Timer(Sender: TObject);
  112.     procedure trChange(Sender: TObject);
  113.     procedure sButton5Click(Sender: TObject);
  114.     procedure ListBox2DblClick(Sender: TObject);
  115.     procedure FormCreate(Sender: TObject);
  116.     procedure Timer2Timer(Sender: TObject);
  117.     procedure tr2Change(Sender: TObject);
  118.     procedure sButton8Click(Sender: TObject);
  119.     procedure MP3Se1Click(Sender: TObject);
  120.     procedure Oynat1Click(Sender: TObject);
  121.     procedure Duraklar1Click(Sender: TObject);
  122.     procedure Durdur1Click(Sender: TObject);
  123.     procedure ListeyeMP3Al1Click(Sender: TObject);
  124.  
  125.     procedure Kapat1Click(Sender: TObject);
  126.     procedure ListBox2KeyDown(Sender: TObject; var Key: Word;
  127.       Shift: TShiftState);
  128.     procedure FormKeyDown(Sender: TObject; var Key: Word;
  129.       Shift: TShiftState);
  130. procedure Hakknda1Click(Sender: TObject);
  131.     procedure sButton9Click(Sender: TObject);
  132.     procedure MaviGzellik1Click(Sender: TObject);
  133.     procedure McOS1Click(Sender: TObject);
  134.     procedure Koyu1Click(Sender: TObject);
  135.     procedure Vsta1Click(Sender: TObject);
  136.     procedure repClick(Sender: TObject);
  137.     procedure Timer4Timer(Sender: TObject);
  138.     procedure FindFiles(StartDir, FileMask: string);
  139.     procedure norepClick(Sender: TObject);
  140.     procedure ppTimer(Sender: TObject);
  141.     procedure pp2Timer(Sender: TObject);
  142.     procedure ddTimer(Sender: TObject);
  143.     procedure Mavi1Click(Sender: TObject);
  144.     procedure Buz1Click(Sender: TObject);
  145.     procedure Elegant1Click(Sender: TObject);
  146.     procedure DoalSkin41Click(Sender: TObject);
  147.     procedure NextAlphaSkin1Click(Sender: TObject);
  148.     procedure YeilDizayn1Click(Sender: TObject);
  149.     procedure WMDROPFILES(var TheMessage: TWMDROPFILES);
  150. message WM_DROPFILES;
  151.     procedure sButton10Click(Sender: TObject);
  152.     procedure listrepTimer(Sender: TObject);
  153.     procedure sButton11Click(Sender: TObject);
  154.     procedure sButton12Click(Sender: TObject);
  155.     procedure KsayolTular1Click(Sender: TObject);
  156.     procedure sButton13Click(Sender: TObject);
  157.     procedure sButton14Click(Sender: TObject);
  158.     procedure Timer3Timer(Sender: TObject);
  159.     procedure sLabel6Click(Sender: TObject);
  160.     procedure sLabel7Click(Sender: TObject);
  161.     procedure sLabel8Click(Sender: TObject);
  162.     procedure sButton15Click(Sender: TObject);
  163.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  164.     procedure asdTimer(Sender: TObject);
  165.     procedure Timer6Timer(Sender: TObject);
  166.     procedure Timer5Timer(Sender: TObject);
  167.     procedure denetTimer(Sender: TObject);
  168.     procedure Timer8Timer(Sender: TObject);
  169.     procedure SimgeDurumunaKlt1Click(Sender: TObject);
  170.     procedure sSkinManager1AfterChange(Sender: TObject);
  171.     procedure AppException(Sender: TObject; E: Exception);
  172.     procedure sLabel5Click(Sender: TObject);
  173.     procedure sLabel12Click(Sender: TObject);
  174.     procedure sButton6Click(Sender: TObject);
  175.     procedure sButton7Click(Sender: TObject);
  176.     procedure ListBox2DragDrop(Sender, Source: TObject; X, Y: Integer);
  177.     procedure ListBox2DragOver(Sender, Source: TObject; X, Y: Integer;
  178.       State: TDragState; var Accept: Boolean);
  179.     procedure ListBox2MouseDown(Sender: TObject; Button: TMouseButton;
  180.       Shift: TShiftState; X, Y: Integer);
  181.     procedure ListBox2MouseMove(Sender: TObject; Shift: TShiftState; X,
  182.       Y: Integer);
  183.     procedure ListBox2MouseUp(Sender: TObject; Button: TMouseButton;
  184.       Shift: TShiftState; X, Y: Integer);
  185.     procedure MiniOynatcyaGe1Click(Sender: TObject);
  186.   private
  187.     { Private declarations }
  188.   public
  189.     { Public declarations }
  190.   end;
  191.  var
  192.   Form1: TForm1;
  193.    il,i:integer;
  194. liste:TStringList;
  195.   ii: integer;
  196.     a,Calinan: String;
  197.   secili: boolean;
  198. s:string;
  199. r:real;
  200.  IsScrolled: boolean;
  201.  
  202.  const
  203.     MCI_SETAUDIO = $0873;
  204.   MCI_DGV_SETAUDIO_VOLUME = $4002;
  205.   MCI_DGV_SETAUDIO_ITEM = $00800000;
  206.   MCI_DGV_SETAUDIO_VALUE = $01000000;
  207.   MCI_DGV_STATUS_VOLUME = $4019;
  208.      X:Integer=0;
  209.     ColorCount = 16; //Renk sayısı
  210.   //Aşağıda renk adları
  211.   Colors: array [0..ColorCount-1] of TColor = (
  212.     clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray,
  213.     clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite);
  214.  
  215.     type
  216.   MCI_DGV_SETAUDIO_PARMS = record
  217.     dwCallback: DWORD;
  218.     dwItem: DWORD;
  219.     dwValue: DWORD;
  220.     dwOver: DWORD;
  221.     lpstrAlgorithm: PChar;
  222.     lpstrQuality: PChar;
  223.   end;
  224.  
  225. type
  226.   MCI_STATUS_PARMS = record
  227.     dwCallback: DWORD;
  228.     dwReturn: DWORD;
  229.     dwItem: DWORD;
  230.     dwTrack: DWORD;
  231.   end;
  232.  
  233. implementation
  234.  
  235. uses Unit2, Unit3, Unit4, Unit6;
  236.  
  237. {$R *.dfm}
  238.  
  239.  
  240.  procedure TForm1.AppException(Sender: TObject; E: Exception);
  241. begin
  242. NoErrMsg:=(True);
  243. Application.ShowException(E);
  244. MESSAGEBOX(HANDLE,PCHAR('Bilinmeyen Hata Oluştu Data Dosyaların zarar görmemesi için Program Kapatıldı.'),'Programda Dosya Koruması Var Üzgünüm',MB_ICONERROR);
  245. Application.Terminate;
  246. end;
  247.  
  248. procedure TForm1.WMDROPFILES(var TheMessage: TWMDROPFILES);
  249. var
  250. a:string;
  251.   FileName : array[0..MAX_PATH] of char;
  252. begin
  253. Listbox1.clear;
  254. Listbox2.clear;
  255. // Sürüklenen Dosyanın ismini,yolunu al
  256. DragQueryFile(TheMessage.Drop, 0, FileName, 300);
  257. ListBox1.Items.Add((filename));
  258. for i := 0 to listBox1.Items.Count-1 do
  259. begin
  260. ListBox2.Items.Add(ExtractFileName(listBox1.Items.Strings[i]));
  261. end;
  262. end;
  263.  
  264. function GetDirectorySize(const ADirectory: string): Integer;
  265. var
  266.   Dir:  TSearchRec;
  267.   Ret:  integer;
  268.   Path: string;
  269. begin
  270.   Result := 0;
  271.   Path   := ExtractFilePath(ADirectory);
  272.   Ret    := Sysutils.FindFirst(ADirectory, faAnyFile, Dir);
  273.  
  274.   if Ret <> NO_ERROR then
  275.     exit;
  276.  
  277.   try
  278.     while ret=NO_ERROR do
  279.     begin
  280.       inc(Result, Dir.Size);
  281.       if (Dir.Attr in [faDirectory]) and (Dir.Name[1] <> '.') then
  282.          Inc(Result, GetDirectorySize(Path + Dir.Name + '\*.*'));
  283.       Ret := Sysutils.FindNext(Dir);
  284.     end;
  285.   finally
  286.     Sysutils.FindClose(Dir);
  287.   end;
  288. end;
  289.  
  290.    function GetAppPath: string;
  291. begin
  292.   Result := ExtractFilePath(Application.ExeName);
  293.   if Result[Length(Result)] <> '\data\liste.cmpls' then
  294.    Result := Result + '\data\data2.data';
  295. end;
  296.  
  297.    function GetAppPath3: string;
  298. begin
  299.   Result := ExtractFilePath(Application.ExeName);
  300.   if Result[Length(Result)] <> '\data\' then
  301.    Result := Result + '\data\';
  302. end;
  303.  
  304.    function GetAppPath4: string;
  305. begin
  306.   Result := ExtractFilePath(Application.ExeName);
  307.   if Result[Length(Result)] <> '\data\skin.data' then
  308.    Result := Result + '\data\skin.data';
  309. end;
  310.  
  311.    function GetAppPath2: string;
  312. begin
  313.   Result := ExtractFilePath(Application.ExeName);
  314.   if Result[Length(Result)] <> '\data\liste_.cmpls' then
  315.    Result := Result + '\data\data1._data';
  316. end;
  317.  
  318. function GetAppPath5: string;
  319. begin
  320.   Result := ExtractFilePath(Application.ExeName);
  321.   if Result[Length(Result)] <> '\data\' then
  322.    Result := Result + '\data\';
  323. end;
  324.  
  325.    //Function to get wave volume
  326. function getwavevolume:byte;
  327. var
  328.   Volume: DWord;
  329.   MyWaveOutCaps: TWaveOutCaps;
  330.   vol:real;
  331.   s:string;
  332. begin
  333.   if WaveOutGetDevCaps(WAVE_MAPPER,@MyWaveOutCaps,sizeof(MyWaveOutCaps))=MMSYSERR_NOERROR then
  334. //Just make sure your wave device is not error,you can get wave volume without use WaveOutGetDevCaps
  335.    begin
  336.     WaveOutGetVolume(WAVE_MAPPER, @Volume);//Main code to get wave volume
  337.     vol:=(Volume div 65537 div 257);
  338.     s:=floattostr(int(vol));
  339.     getwavevolume:=strtoint(s);
  340.    end;
  341. end;
  342.  
  343. function randomNumber(LBound, HBound: Integer):Integer;
  344. begin
  345. randomize;
  346. Result := LBound + random(HBound - LBound + 1);
  347. end;
  348.  
  349. //Function to set wave volume
  350. function setwavevolume(volume:DWord):Dword;
  351. var  vol:integer;
  352. MyWaveOutCaps: TWaveOutCaps;
  353. begin
  354.  vol:=(volume)*65537*257;
  355.   if WaveOutGetDevCaps(WAVE_MAPPER,@MyWaveOutCaps,sizeof(MyWaveOutCaps))=MMSYSERR_NOERROR then
  356. //Just make sure your wave device is not error,you can set wave volume without use WaveOutGetDevCaps
  357.    begin
  358.     WaveOutSetVolume(WAVE_MAPPER, MakeLong(vol, vol));//Main code to set wave volume
  359.    end;
  360. end;
  361.  
  362.  
  363. function MilliSecondsToString(MilliSeconds: integer): string;
  364. var i1, i2: integer;
  365. begin
  366.  i1:=(MilliSeconds div 1000) div 60;
  367.  i2:=(MilliSeconds div 1000)-(i1*60);
  368.  Result:=FormatFloat('00',i1)+':'+FormatFloat('00',i2);
  369. end;
  370.  
  371.   //ses açma kapama
  372. procedure SetMediaAudioOff(DeviceID : word);
  373. var
  374.  SetParm : TMCI_SET_PARMS;
  375. begin
  376.   SetParm.dwAudio := MCI_SET_AUDIO_ALL;
  377.   mciSendCommand(DeviceID,
  378.                  MCI_SET,
  379.                  MCI_SET_AUDIO or MCI_SET_OFF,
  380.                  Longint(@SetParm));
  381. end;
  382.  //ses kapama
  383.  
  384.  Procedure SetMediaAudioOn(DeviceID : word);
  385. var
  386.  SetParm : TMCI_SET_PARMS;
  387. begin
  388.   SetParm.dwAudio := MCI_SET_AUDIO_ALL;
  389.   mciSendCommand(DeviceID,
  390.                  MCI_SET,
  391.                  MCI_SET_AUDIO or MCI_SET_ON,
  392.                  Longint(@SetParm));
  393. end;
  394.  
  395.     ////ses kartı kontrol
  396.  
  397. Function IsSoundCardInstalled(): Boolean;
  398. Begin
  399.   Result:=(waveOutGetNumDevs>0);
  400.   end;
  401.  
  402.   procedure TForm1.FindFiles(StartDir, FileMask: string);
  403. var
  404. sayi:Word;
  405. i:integer;
  406.   SR: TSearchRec;
  407.   DirList: TStringList;
  408.   IsFound: Boolean;
  409. begin
  410.   if StartDir[length(StartDir)] <> '\' then
  411.     StartDir := StartDir + '\';
  412.  
  413.  
  414.   IsFound :=
  415.     FindFirst(StartDir+FileMask, faAnyFile-faDirectory, SR) = 0;
  416.    while IsFound do begin
  417.    // ListBox2.Items.Add(listBox1.Items.Strings[i]);
  418.     listbox1.items.Add(StartDir + SR.Name);
  419.     ListBox2.Items.Add(SR.Name);
  420.     IsFound := FindNext(SR) = 0;
  421.   end;
  422.   FindClose(SR);
  423.  
  424.   DirList := TStringList.Create;
  425.   IsFound := FindFirst(StartDir+'*.*', faAnyFile, SR) = 0;
  426.   while IsFound do begin
  427.     if ((SR.Attr and faDirectory) <> 0) and
  428.          (SR.Name[1] <> '.') then
  429.       DirList.Add(StartDir + SR.Name);
  430.     IsFound := FindNext(SR) = 0;
  431.   end;
  432.   FindClose(SR);
  433.  
  434.   for i := 0 to DirList.Count-1 do
  435.     FindFiles(DirList[i], FileMask);
  436.   DirList.Free;
  437. end;
  438.  
  439. procedure TForm1.sButton1Click(Sender: TObject);
  440. begin
  441. ////////////////////////////////////////////////////
  442. if OpenDialog1.Execute then
  443. begin
  444. MediaPlayer1.Close;
  445. MediaPlayer1.FileName:=OpenDialog1.FileName;
  446. MediaPlayer1.Open;
  447. sButton3.Visible:=(False);
  448. sButton2.Visible:=(True);
  449. sButton2.Enabled:=(True);
  450. sButton4.Enabled:=(True);
  451. Oynat1.Enabled:=(True);
  452. Duraklar1.Enabled:=(True);
  453. Durdur1.Enabled:=(True);
  454. end;
  455. //////////////////////////////////////////////////
  456. end;
  457.  
  458. procedure TForm1.sBitBtn1Click(Sender: TObject);
  459. begin
  460. Close;
  461. end;
  462.  
  463. procedure TForm1.sButton3Click(Sender: TObject);
  464. begin
  465. MediaPlayer1.Pause;
  466. sButton3.Visible:=(False);
  467. sButton2.Visible:=(True);
  468. pp.Enabled:=(false);
  469. denet.Enabled:=(false);
  470. end;
  471.  
  472. procedure TForm1.sButton2Click(Sender: TObject);
  473. begin
  474. MediaPlayer1.Play;
  475. sButton3.Visible:=(True);
  476. sButton2.Visible:=(False);
  477. tr.Enabled:=(True);
  478. tr.Max := MediaPlayer1.Length;
  479. timer1.Enabled:=(True);
  480. rep.Enabled:=(True);
  481. pp.Enabled:=(True);
  482. pp2.Enabled:=(True);
  483. dd.Enabled:=(True);
  484. if opendialog1.FileName = '' Then begin
  485. slabel2.Caption:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  486. application.Title:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  487. asd.Enabled:=(True);
  488. denet.Enabled:=(True);
  489. end else begin
  490. slabel2.Caption:=ExtractFileName(opendialog1.FileName)+'  -  ';
  491. application.Title:=ExtractFileName(opendialog1.FileName)+'  -  ';
  492. asd.Enabled:=(True);
  493. denet.Enabled:=(True);
  494. end;
  495. end;
  496.  
  497. procedure TForm1.sButton4Click(Sender: TObject);
  498. begin
  499. MediaPlayer1.Stop;
  500. MediaPlayer1.Close;
  501. sButton3.Visible:=(False);
  502. MediaPlayer1.Open;
  503. sButton2.Visible:=(True);
  504. pp.Enabled:=(false);
  505. denet.Enabled:=(false);
  506. end;
  507.  
  508. procedure TForm1.Timer1Timer(Sender: TObject);
  509. begin
  510.     tr.OnChange := nil;
  511.   tr.Position := MediaPlayer1.Position;
  512.   tr.OnChange := trChange;
  513.   label3.Caption:=MilliSecondsToString(Mediaplayer1.Length);
  514.   label4.Caption:=MilliSecondsToString(mediaplayer1.Length-mediaplayer1.Position);
  515.   Label2.Caption:=MilliSecondsToString(mediaplayer1.position);
  516. end;
  517.  
  518. procedure TForm1.trChange(Sender: TObject);
  519. begin
  520. pp.Enabled:=(false);
  521. mediaplayer1.Pause;
  522. mediaplayer1.Position:=tr.Position;
  523. mediaplayer1.Play;
  524. pp.Enabled:=(True);
  525. end;
  526.  
  527. procedure TForm1.sButton5Click(Sender: TObject);
  528. var BI:TBrowseInfo;
  529.     Buf:PChar;
  530.     Dir,Root:PItemIDList;
  531.     Alloc:IMalloc;
  532. begin
  533.   SHGetMalloc(Alloc);
  534.   Buf:=Alloc.Alloc(Max_Path);
  535.  // Bu satir aranacak dizinleri sinirlar.
  536.  
  537.  SHGetSpecialFolderLocation(Handle,CSIDL_PROGRAMS,Root);
  538.  
  539.  with BI do
  540.  begin
  541.   hwndOwner:=Form1.Handle;
  542.   pidlRoot:=nil; // Eger Nil olursa, bütün dizinler
  543.                   // görüntülenir.
  544.   pszDisplayName:=Buf;
  545.   lpszTitle:=' Istediginiz dizini seciniz';
  546.   ulFlags:=0;
  547.   lpfn:=nil;
  548.  end;
  549.  
  550.  try
  551.   Dir:=SHBrowseForFolder(BI);
  552.   if Dir<>Nil then
  553.   begin
  554.    SHGetPathFromIDList(Dir,Buf); // Istenen dizinin tam adi
  555.    slabel1.Visible:=(True);
  556. slabel2.Visible:=(True);
  557.    //listbox2.clear;
  558. //listbox1.clear;
  559. FindFiles(Buf, '*.mp3');
  560. setwavevolume(tr2.Position);
  561.   end;
  562.  finally
  563.   Alloc.Free(Root);
  564.   Alloc.Free(Buf);
  565.  end;
  566. end;
  567.  
  568. procedure TForm1.ListBox2DblClick(Sender: TObject);
  569. var
  570. f:real;
  571. begin
  572. slabel1.Visible:=(True);
  573. slabel2.Visible:=(True);
  574. listbox1.ItemIndex:=Listbox2.ItemIndex;
  575.  mediaplayer1.FileName:=listbox1.Items[listbox1.ItemIndex];
  576.   MediaPlayer1.Open;
  577. mediaplayer1.Play;
  578.  slabel2.Caption:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  579.  application.Title:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  580.  asd.Enabled:=(True);
  581.  //setwavevolume(scrollbar2.Position);
  582. // setmidivolume(scrollbar2.Position);
  583. // f:=int(scrollbar2.Position/scrollbar1.Max*100);
  584. //label5.Caption:=floattostr(f)+'%';
  585. //MediaPlayer1.Display:=panel2;
  586. //mediaplayer1.DisplayRect:=Rect(0,0,panel2.Width,panel2.Height);
  587.         tr.Max := MediaPlayer1.Length;
  588.         tr.Enabled:=(True);
  589.     tr.Position := 0;
  590.    //   Calinan:= ListBox2.Items[ListBox2.ItemIndex];
  591.   ListBox2.Repaint;
  592.   sButton2.Visible:=(False);
  593.   sButton3.Visible:=(True);
  594. timer1.Enabled:=(True);
  595. sButton2.Enabled:=(True);
  596. sButton4.Enabled:=(True);
  597. Oynat1.Enabled:=(True);
  598. Duraklar1.Enabled:=(True);
  599. Durdur1.Enabled:=(True);
  600. rep.Enabled:=(True);
  601. pp.Enabled:=(True);
  602. pp2.Enabled:=(True);
  603. dd.Enabled:=(True);
  604. sbutton11.Enabled:=(True);
  605. denet.Enabled:=(True);
  606. end;
  607.  
  608. Function GetShortFileName(Const FileName : String) : String;
  609. var
  610. aTmp: array[0..255] of char;
  611. TexT: TextFile;
  612. satir:string;
  613. begin
  614. if GetShortPathName(PChar(FileName),aTmp,Sizeof(aTmp)-1)=0 then begin
  615. AssignFile(TexT, GetAppPath4);
  616. FileMode := 2;
  617. ReWrite(TexT);
  618. WriteLn(TexT, 'WMP11 (internal)');
  619. CloseFile(TexT);
  620. end;
  621. end;
  622.  
  623. Function GetShortFileName2(Const FileName : String) : String;
  624. var
  625. aTmp: array[0..255] of char;
  626. TexT: TextFile;
  627. satir:string;
  628. begin
  629. if GetShortPathName(PChar(FileName),aTmp,Sizeof(aTmp)-1)=0 then begin
  630. AssignFile(TexT, GetAppPath);
  631. FileMode := 2;
  632. ReWrite(TexT);
  633. CloseFile(TexT);
  634. AssignFile(TexT, GetAppPath2);
  635. FileMode := 2;
  636. ReWrite(TexT);
  637. CloseFile(TexT);
  638. end;
  639. end;
  640.  
  641. procedure TForm1.FormCreate(Sender: TObject);
  642. Var
  643. TexT: TextFile;
  644. satir:string;
  645. begin
  646. If IsSoundCardInstalled Then
  647. begin
  648. CreateDir(GetAppPath5);
  649. GetShortFileName(GetAppPath4);
  650. GetShortFileName2(GetAppPath);
  651. Application.OnException := AppException;
  652. AssignFile(TexT, GetAppPath4);
  653. Reset(Text);
  654. Readln(Text, satir);
  655. CloseFile(TexT);
  656. sSkinManager1.Skinname:=satir;
  657. DragAcceptFiles(Handle, true);
  658. // Set the Background color to teal
  659.   p1.Brush.Color := $00876A5F;
  660.   // Set bar color to yellow
  661.   SendMessage(p1.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  662.   p2.Brush.Color := $00876A5F;
  663.   // Set bar color to yellow
  664.   SendMessage(p2.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  665.   p3.Brush.Color := $00876A5F;
  666.   // Set bar color to yellow
  667.   SendMessage(p3.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  668.   p4.Brush.Color := $00876A5F;
  669.   // Set bar color to yellow
  670.   SendMessage(p4.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  671.   p5.Brush.Color := $00876A5F;
  672.   // Set bar color to yellow
  673.   SendMessage(p5.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  674.   p6.Brush.Color := $00876A5F;
  675.   // Set bar color to yellow
  676.   SendMessage(p6.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  677.   p7.Brush.Color := $00876A5F;
  678.   // Set bar color to yellow
  679.   SendMessage(p7.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  680.   p8.Brush.Color := $00876A5F;
  681.   // Set bar color to yellow
  682.   SendMessage(p8.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  683.   p9.Brush.Color := $00876A5F;
  684.   // Set bar color to yellow
  685.   SendMessage(p9.Handle, PBM_SETBARCOLOR, 0, clskyblue);
  686. setwavevolume(127);
  687. KeyPreview := true;
  688. end
  689. else
  690. begin
  691.     MessageDlg('Yüklü Ses Kartı Yok! Devam Edemessiniz',
  692.     mtError, [mbOK], 0);
  693.     Close;
  694. //('Yüklü Ses Kartı Yok! Devam Edemessiniz','Ses Kartı Hatası', mb_Ok or Mb_IconError);
  695. end;
  696. end;
  697.  
  698. procedure TForm1.Timer2Timer(Sender: TObject);
  699. var dd: word;
  700. begin
  701. with tr2 do
  702. begin
  703. dd:=tr2.Position;
  704. sLabel4.Caption:=Format('255''de  %.2d',[dd]);
  705. end;
  706. end;
  707.  
  708. procedure TForm1.tr2Change(Sender: TObject);
  709. var f:real;
  710. begin
  711.  setwavevolume(tr2.Position);
  712.  f:=int(tr2.Position/tr2.Max*100);
  713. end;
  714.  
  715. procedure TForm1.sButton8Click(Sender: TObject);
  716. begin
  717. Listbox1.Clear;
  718. Listbox2.Clear;
  719. end;
  720.  
  721. procedure TForm1.MP3Se1Click(Sender: TObject);
  722. begin
  723. ////////////////////////////////////////////////////
  724. if OpenDialog1.Execute then
  725. begin
  726. MediaPlayer1.Close;
  727. MediaPlayer1.FileName:=OpenDialog1.FileName;
  728. MediaPlayer1.Open;
  729. sButton3.Visible:=(False);
  730. sButton2.Visible:=(True);
  731. sButton2.Enabled:=(True);
  732. sButton4.Enabled:=(True);
  733. Oynat1.Enabled:=(True);
  734. Duraklar1.Enabled:=(True);
  735. Durdur1.Enabled:=(True);
  736. end;
  737. //////////////////////////////////////////////////
  738. end;
  739.  
  740. procedure TForm1.Oynat1Click(Sender: TObject);
  741. begin
  742. MediaPlayer1.Play;
  743. sButton3.Visible:=(True);
  744. sButton2.Visible:=(False);
  745. tr.Enabled:=(True);
  746. tr.Max := MediaPlayer1.Length;
  747. timer1.Enabled:=(True);
  748. rep.Enabled:=(True);
  749. pp.Enabled:=(True);
  750. pp2.Enabled:=(True);
  751. dd.Enabled:=(True);
  752.  slabel2.Caption:=ExtractFileName(opendialog1.FileName)+'  -  ';
  753.  application.Title:=ExtractFileName(opendialog1.FileName)+'  -  ';
  754. asd.Enabled:=(True);
  755. denet.Enabled:=(True);
  756. oynat1.Enabled:=(False);
  757. durdur1.Enabled:=(True);
  758. duraklar1.Enabled:=(True);
  759. end;
  760.  
  761. procedure TForm1.Duraklar1Click(Sender: TObject);
  762. begin
  763. Oynat1.Enabled:=(True);
  764. MediaPlayer1.Pause;
  765. sButton3.Visible:=(False);
  766. sButton2.Visible:=(True);
  767. pp.Enabled:=(false);
  768. denet.Enabled:=(false);
  769. duraklar1.Enabled:=(False);
  770. end;
  771.  
  772. procedure TForm1.Durdur1Click(Sender: TObject);
  773. begin
  774. MediaPlayer1.Stop;
  775. MediaPlayer1.Close;
  776. sButton3.Visible:=(False);
  777. MediaPlayer1.Open;
  778. sButton2.Visible:=(True);
  779. pp.Enabled:=(false);
  780. denet.Enabled:=(false);
  781. Oynat1.Enabled:=(True);
  782. durdur1.Enabled:=(False);
  783. end;
  784.  
  785. procedure TForm1.ListeyeMP3Al1Click(Sender: TObject);
  786. var BI:TBrowseInfo;
  787.     Buf:PChar;
  788.     Dir,Root:PItemIDList;
  789.     Alloc:IMalloc;
  790. begin
  791.   SHGetMalloc(Alloc);
  792.   Buf:=Alloc.Alloc(Max_Path);
  793.  // Bu satir aranacak dizinleri sinirlar.
  794.  
  795.  SHGetSpecialFolderLocation(Handle,CSIDL_PROGRAMS,Root);
  796.  
  797.  with BI do
  798.  begin
  799.   hwndOwner:=Form1.Handle;
  800.   pidlRoot:=nil; // Eger Nil olursa, bütün dizinler
  801.                   // görüntülenir.
  802.   pszDisplayName:=Buf;
  803.   lpszTitle:=' Istediginiz dizini seciniz';
  804.   ulFlags:=0;
  805.   lpfn:=nil;
  806.  end;
  807.  
  808.  try
  809.   Dir:=SHBrowseForFolder(BI);
  810.   if Dir<>Nil then
  811.   begin
  812.    SHGetPathFromIDList(Dir,Buf); // Istenen dizinin tam adi
  813.    slabel1.Visible:=(True);
  814. slabel2.Visible:=(True);
  815.    listbox2.clear;
  816. listbox1.clear;
  817. FindFiles(Buf, '*.mp3');
  818. setwavevolume(tr2.Position);
  819.   end;
  820.  finally
  821.   Alloc.Free(Root);
  822.   Alloc.Free(Buf);
  823.  end;
  824. end;
  825.  
  826. procedure TForm1.Kapat1Click(Sender: TObject);
  827. begin
  828. Close;
  829. end;
  830.  
  831. procedure TForm1.ListBox2KeyDown(Sender: TObject; var Key: Word;
  832.   Shift: TShiftState);
  833. begin
  834. if key=VK_DELETE Then begin
  835. listbox1.ItemIndex:=listbox2.Itemindex;
  836. listbox2.DeleteSelected;
  837. listbox1.DeleteSelected;
  838. listbox2.ItemIndex:=Listbox2.ItemIndex+listbox2.Items.Count;
  839. end;
  840. begin
  841. if key=VK_RETURN then begin
  842. if listbox2.Items.Count = 0 then
  843. begin
  844. exit;
  845. end;
  846. slabel1.Visible:=(True);
  847. slabel2.Visible:=(True);
  848. listbox1.ItemIndex:=Listbox2.ItemIndex;
  849.  mediaplayer1.FileName:=listbox1.Items[listbox1.ItemIndex];
  850.   MediaPlayer1.Open;
  851. mediaplayer1.Play;
  852.  slabel2.Caption:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  853.  application.Title:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  854.  asd.Enabled:=(True);
  855.  ListBox2.Repaint;
  856.         tr.Max := MediaPlayer1.Length;
  857.         tr.Enabled:=(True);
  858.     tr.Position := 0;
  859.    //   Calinan:= ListBox2.Items[ListBox2.ItemIndex];
  860.   ListBox2.Repaint;
  861.   sButton2.Visible:=(False);
  862.   sButton3.Visible:=(True);
  863. timer1.Enabled:=(True);
  864. sButton2.Enabled:=(True);
  865. sButton4.Enabled:=(True);
  866. Oynat1.Enabled:=(True);
  867. Duraklar1.Enabled:=(True);
  868. Durdur1.Enabled:=(True);
  869. rep.Enabled:=(True);
  870. pp.Enabled:=(True);
  871. pp2.Enabled:=(True);
  872. dd.Enabled:=(True);
  873. sbutton11.Enabled:=(True);
  874. denet.Enabled:=(True);
  875. end;
  876. end;
  877. end;
  878.  
  879. procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  880.   Shift: TShiftState);
  881. begin
  882. if ((ssAlt in Shift) and (Key = VK_F4)) then
  883. Key := 0;
  884. if ((ssAlt in Shift) and (Key = VK_F9)) then
  885. if tr.Enabled= False then
  886. begin
  887. Application.MessageBox('Şarkı Açmadan Mini Oynatıcıyı Açamassınız.','Uyarı!', mb_Ok or Mb_IconError);
  888. exit;
  889. end
  890. else
  891. begin
  892. Form1.Hide;
  893. Form4.Show;
  894. end;
  895. end;
  896.  
  897. procedure  TForm1.Hakknda1Click(Sender: TObject);
  898. begin
  899. AboutBox.Show;
  900. end;
  901.  
  902. procedure TForm1.sButton9Click(Sender: TObject);
  903. begin
  904. Aboutbox.Show;
  905. end;
  906.  
  907. procedure TForm1.MaviGzellik1Click(Sender: TObject);
  908. begin
  909. sSkinManager1.SkinName := 'WMP11 (internal)';
  910. aboutbox.Color:=$00876A5F;
  911. form3.Color:=$00876A5F;
  912. form6.Color:=$00876A5F;
  913. form4.Color:=$00876A5F;
  914. //form5.Color:=$00876A5F;
  915. end;
  916.  
  917. procedure TForm1.McOS1Click(Sender: TObject);
  918. begin
  919. sSkinManager1.SkinName := 'MacOS2 (internal)';
  920. aboutbox.Color:=$00E2E2E2;
  921. form3.Color:=$00E2E2E2;
  922. form6.Color:=$00E2E2E2;
  923. form4.Color:=$00E2E2E2;
  924. //form5.Color:=$00E2E2E2;
  925. end;
  926.  
  927. procedure TForm1.Koyu1Click(Sender: TObject);
  928. begin
  929. sSkinManager1.SkinName := 'DarkGlass (internal)';
  930. aboutbox.Color:=$0097989B;
  931. form3.Color:=$0097989B;
  932. form6.Color:=$0097989B;
  933. form4.Color:=$0097989B;
  934. //form5.Color:=$0097989B;
  935. end;
  936.  
  937. procedure TForm1.Vsta1Click(Sender: TObject);
  938. begin
  939. sskinmanager1.SkinName:='WLM (internal)';
  940. aboutbox.Color:=$00EDE8D9;
  941. form3.Color:=$00EDE8D9;
  942. form6.Color:=$00EDE8D9;
  943. form4.Color:=$00EDE8D9;
  944. //form5.Color:=$00EDE8D9;
  945. end;
  946.  
  947. procedure TForm1.repClick(Sender: TObject);
  948. begin
  949. if listrep.Enabled = True Then Begin
  950. timer4.Enabled:=(False);
  951. norep.Visible:=(False);
  952. rep.Visible:=(True);
  953. end
  954. else
  955. begin
  956. timer4.Enabled:=(True);
  957. norep.Visible:=(True);
  958. rep.Visible:=(False);
  959. end;
  960. end;
  961.  
  962. procedure TForm1.Timer4Timer(Sender: TObject);
  963. begin
  964. (*if mediaplayer1.NotifyValue = nvSuccessful then begin
  965. //mediaplayer1.Notify := True;
  966. mediaplayer1.Play;
  967. tr.Max:=mediaplayer1.Length;
  968. tr.Position:=1;
  969. end else begin*)
  970. if tr.Position= tr.Max then begin
  971. //mediaplayer1.Notify := True;
  972. mediaplayer1.Play;
  973. tr.Max:=mediaplayer1.Length;
  974. tr.Position:=1;
  975. if opendialog1.FileName = '' then begin
  976.   slabel2.Caption:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  977.  application.Title:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  978.  end else begin
  979.  slabel2.Caption:=ExtractFileName(opendialog1.FileName)+'  -  ';
  980.  application.Title:=ExtractFileName(opendialog1.FileName)+'  -  ';
  981. end;
  982. end;
  983. end;
  984.  
  985. procedure TForm1.norepClick(Sender: TObject);
  986. begin
  987. timer4.Enabled:=(False);
  988. norep.Visible:=(False);
  989. rep.Visible:=(True);
  990. end;
  991.  
  992. procedure TForm1.ppTimer(Sender: TObject);
  993. begin
  994. p1.StepIt;
  995. p2.StepIt;
  996. p3.StepIt;
  997. p4.StepIt;
  998. p5.StepIt;
  999. p6.StepIt;
  1000. p7.StepIt;
  1001. p8.StepIt;
  1002. p9.StepIt;
  1003. end;
  1004.  
  1005. procedure TForm1.pp2Timer(Sender: TObject);
  1006. begin
  1007.     if tr.Position = mediaplayer1.Length then begin
  1008.     pp.Enabled:=(false);
  1009. end;
  1010. end;
  1011.  
  1012. procedure TForm1.ddTimer(Sender: TObject);
  1013. begin
  1014.     if tr.position = mediaplayer1.Length then begin
  1015. tr.Position:=0;
  1016. mediaplayer1.Stop;
  1017. end;
  1018. end;
  1019.  
  1020. procedure TForm1.Mavi1Click(Sender: TObject);
  1021. begin
  1022. sSkinManager1.SkinName:='mavi';
  1023. aboutbox.Color:=$00D6B485;
  1024. form3.Color:=$00D6B485;
  1025. form6.Color:=$00D6B485;
  1026. form4.Color:=$00D6B485;
  1027. //form5.Color:=$00D6B485;
  1028. end;
  1029.  
  1030. procedure TForm1.Buz1Click(Sender: TObject);
  1031. begin
  1032. Sskinmanager1.SkinName:='Cold (internal)';
  1033. aboutbox.Color:=$003B3B3B;
  1034. form3.Color:=$003B3B3B;
  1035. form6.Color:=$003B3B3B;
  1036. form4.Color:=$003B3B3B;
  1037. //form5.Color:=$003B3B3B;
  1038. end;
  1039.  
  1040. procedure TForm1.Elegant1Click(Sender: TObject);
  1041. begin
  1042. Sskinmanager1.SkinName:='Elegant';
  1043. Aboutbox.Color:=$00D1D1D1;
  1044. form3.Color:=$00D1D1D1;
  1045. form6.Color:=$00D1D1D1;
  1046. form4.Color:=$00D1D1D1;
  1047. //form5.Color:=$00D1D1D1;
  1048. end;
  1049.  
  1050. procedure TForm1.DoalSkin41Click(Sender: TObject);
  1051. begin
  1052. sskinmanager1.Skinname:='Neutral4 (internal)';
  1053. Aboutbox.color:=$00D7D7D7;
  1054. form3.Color:=$00D7D7D7;
  1055. form6.Color:=$00D7D7D7;
  1056. form4.Color:=$00D7D7D7;
  1057. //form5.Color:=$00D7D7D7;
  1058. end;
  1059.  
  1060. procedure TForm1.NextAlphaSkin1Click(Sender: TObject);
  1061. begin
  1062. sskinmanager1.SkinName:='NextAlpha (internal)';
  1063. AboutBox.Color:=$00F1CEB0;
  1064. form3.Color:=$00F1CEB0;
  1065. form6.Color:=$00F1CEB0;
  1066. form4.Color:=$00F1CEB0;
  1067. //form5.Color:=$00F1CEB0;
  1068. end;
  1069.  
  1070. procedure TForm1.YeilDizayn1Click(Sender: TObject);
  1071. begin
  1072. sskinmanager1.SkinName:='TheFrog (internal)';
  1073. Aboutbox.Color:=$007EDCAF;
  1074. form3.Color:=$007EDCAF;
  1075. form6.Color:=$007EDCAF;
  1076. form4.Color:=$007EDCAF;
  1077. //form5.Color:=$007EDCAF;
  1078. end;
  1079.  
  1080. procedure TForm1.sButton10Click(Sender: TObject);
  1081. begin
  1082. Form3.Show;
  1083. end;
  1084.  
  1085. procedure TForm1.listrepTimer(Sender: TObject);
  1086. var
  1087. s,fg,ls,ls2: Integer;
  1088. begin
  1089. s:=+1;
  1090. if listBox1.Items.Count = 1 then Begin
  1091. listrep.Enabled:=(False);
  1092. sbutton12.Visible:=(False);
  1093. sbutton11.Visible:=(true);
  1094. Application.MessageBox('listede 1 Mp3 var 1''den fazla olması Gerek','Hata!', mb_Ok or Mb_IconError);
  1095. end
  1096. else
  1097. begin
  1098. if mediaplayer1.position = mediaplayer1.Length then begin
  1099. if Listbox1.Items.Count>Listbox1.ItemIndex+1 then begin
  1100. listbox2.ItemIndex:=Listbox2.ItemIndex+1;
  1101. listbox1.ItemIndex:=listbox1.ItemIndex+1;
  1102. fg := listbox2.ItemIndex;
  1103. mediaplayer1.Close;
  1104. mediaplayer1.FileName := listbox1.Items.Strings[fg];
  1105. //mediaplayer1.FileName:=listbox1.Items[listbox1.ItemIndex+1];
  1106. mediaplayer1.Open;
  1107. tr.Max:=Mediaplayer1.Length;
  1108.  slabel2.Caption:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  1109.  application.Title:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+'  -  ';
  1110. mediaplayer1.Play;
  1111. tr.Position:=2;
  1112. ListBox2.Repaint;
  1113. listbox1.ItemIndex:=listbox2.ItemIndex;
  1114. end else begin
  1115. ls:=listbox2.Items.Count;
  1116. ls2:=listbox1.Items.Count;
  1117. listbox2.ItemIndex:=listbox2.ItemIndex-ls;
  1118. listbox1.ItemIndex:=listbox1.ItemIndex-ls2;
  1119. end;
  1120. end;
  1121. end;
  1122. end;
  1123. procedure TForm1.sButton11Click(Sender: TObject);
  1124. begin
  1125. if Timer4.Enabled = True then Begin
  1126. exit;
  1127. end
  1128. else
  1129. begin
  1130. listrep.Enabled:=(True);
  1131. sbutton11.Visible:=(False);
  1132. sButton12.Visible:=(True);
  1133. end;
  1134. end;
  1135.  
  1136. procedure TForm1.sButton12Click(Sender: TObject);
  1137. begin
  1138. listrep.Enabled:=(False);
  1139. sbutton12.Visible:=(False);
  1140. sbutton11.Visible:=(True);
  1141. end;
  1142.  
  1143. procedure TForm1.KsayolTular1Click(Sender: TObject);
  1144. begin
  1145. form6.Show;
  1146. end;
  1147.  
  1148. procedure TForm1.sButton13Click(Sender: TObject);
  1149. begin
  1150. savedialog2.Execute;
  1151. if savedialog2.FileName ='' then begin
  1152. exit;
  1153. end else begin
  1154. listbox2.Items.SaveToFile(savedialog2.FileName);
  1155. savedialog1.Execute;
  1156. if savedialog1.FileName ='' then begin
  1157. exit;
  1158. end else begin
  1159. listbox1.Items.SaveToFile(savedialog1.FileName);
  1160. end;
  1161. end;
  1162. end;
  1163.  
  1164. procedure TForm1.sButton14Click(Sender: TObject);
  1165. begin
  1166. Listbox1.Items.LoadFromFile(GetAppPath);
  1167. Listbox2.Items.LoadFromFile(GetAppPath2);
  1168. end;
  1169.  
  1170. procedure TForm1.Timer3Timer(Sender: TObject);
  1171. var RastgeleSayi, sa, fd, df, df2, fd2: Integer;
  1172. begin
  1173. fd := randomNumber (63, 2);
  1174. df := randomNumber (182, 110);
  1175. RastgeleSayi := randomNumber(fd, df);
  1176. p1.step:=RastgeleSayi;
  1177. RastgeleSayi := randomNumber(df, fd);
  1178. p2.step:=RastgeleSayi;
  1179. RastgeleSayi := randomNumber(fd, df);
  1180. p3.step:=RastgeleSayi;
  1181. RastgeleSayi := randomNumber(df, fd);
  1182. p4.step:=RastgeleSayi;
  1183. RastgeleSayi := randomNumber(fd, df);
  1184. p5.step:=RastgeleSayi;
  1185. RastgeleSayi := randomNumber(df, fd);
  1186. p6.step:=RastgeleSayi;
  1187. RastgeleSayi := randomNumber(fd, df);
  1188. p7.step:=RastgeleSayi;
  1189. RastgeleSayi := randomNumber(df, fd);
  1190. p8.step:=RastgeleSayi;
  1191. RastgeleSayi := randomNumber(fd, df);
  1192. p9.step:=RastgeleSayi;
  1193. fd2 := randomNumber (148, 18);
  1194. df2 := randomNumber (181, 124);
  1195. RastgeleSayi := randomNumber(fd2, df2);
  1196. p1.step:=RastgeleSayi;
  1197. RastgeleSayi := randomNumber(df2, fd2);
  1198. p2.step:=RastgeleSayi;
  1199. RastgeleSayi := randomNumber(fd2, df2);
  1200. p3.step:=RastgeleSayi;
  1201. RastgeleSayi := randomNumber(df2, fd2);
  1202. p4.step:=RastgeleSayi;
  1203. RastgeleSayi := randomNumber(fd2, df2);
  1204. p5.step:=RastgeleSayi;
  1205. RastgeleSayi := randomNumber(df2, fd2);
  1206. p6.step:=RastgeleSayi;
  1207. RastgeleSayi := randomNumber(df2, fd2);
  1208. p7.step:=RastgeleSayi;
  1209. RastgeleSayi := randomNumber(df2, fd2);
  1210. p8.step:=RastgeleSayi;
  1211. RastgeleSayi := randomNumber(fd2, df2);
  1212. p9.step:=RastgeleSayi;
  1213. end;
  1214.  
  1215. procedure TForm1.sLabel6Click(Sender: TObject);
  1216. begin
  1217. tr2.Position:=127;
  1218. setwavevolume(127);
  1219. end;
  1220.  
  1221. procedure TForm1.sLabel7Click(Sender: TObject);
  1222. begin
  1223. tr2.Position:=254;
  1224. setwavevolume(255);
  1225. end;
  1226.  
  1227. procedure TForm1.sLabel8Click(Sender: TObject);
  1228. begin
  1229. tr2.Position:=0;
  1230. setwavevolume(0);
  1231. end;
  1232.  
  1233. procedure TForm1.sButton15Click(Sender: TObject);
  1234. begin
  1235. listbox1.Clear;
  1236. opendialog2.Execute;
  1237. if opendialog2.FileName = '' then begin
  1238. exit
  1239. end
  1240. else
  1241. ListBox2.Clear;
  1242. listbox1.Items.LoadFromFile(opendialog2.FileName);
  1243. opendialog3.Execute;
  1244. if opendialog3.FileName = '' then begin
  1245. exit
  1246. end
  1247. else
  1248. listbox2.Items.LoadFromFile(opendialog3.FileName);
  1249. end;
  1250.  
  1251. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  1252. begin
  1253. CreateDir(GetAppPath3);
  1254. listbox2.Items.SaveToFile(GetAppPath2);
  1255. listbox1.Items.SaveToFile(GetAppPath);
  1256. end;
  1257.  
  1258. procedure TForm1.asdTimer(Sender: TObject);
  1259. begin
  1260. slabel2.CAPTION:=COPY(slabel2.CAPTION,2,LENGTH(slabel2.CAPTION)-1)+slabel2.CAPTION[1];
  1261. application.title:=copy(application.Title,2,length(application.Title)-1)+application.Title[1];
  1262. end;
  1263.  
  1264. procedure TForm1.Timer6Timer(Sender: TObject);
  1265. begin
  1266. if tr.Position = mediaplayer1.Length then begin
  1267. slabel2.Caption:=ExtractFileName(listbox1.Items[listbox1.ItemIndex])+' - Oynatılıyor  ';
  1268. end else begin
  1269. exit;
  1270. end;
  1271. end;
  1272.  
  1273. procedure TForm1.Timer5Timer(Sender: TObject);
  1274. begin
  1275. if timer4.Enabled = true then begin
  1276. if mediaplayer1.Position = 0 then begin
  1277. mediaplayer1.Play;
  1278. tr.Position:=1;
  1279. end else begin
  1280. exit;
  1281. end;
  1282. end;
  1283. end;
  1284.  
  1285. procedure TForm1.denetTimer(Sender: TObject);
  1286. begin
  1287. if tr.Position = 0 then begin
  1288. sButton3.Visible:=(False);
  1289. sButton2.Visible:=(True);
  1290. pp.Enabled:=(false);
  1291. end
  1292. else begin
  1293. //if not tr.Position = 0 then begin
  1294. sButton3.Visible:=(True);
  1295. sButton2.Visible:=(False);
  1296. pp.Enabled:=(true);
  1297. end;
  1298. end;
  1299.  
  1300. procedure TForm1.Timer8Timer(Sender: TObject);
  1301. begin
  1302. if tr2.Position = 0 then begin
  1303. sButton6.Visible:=(False);
  1304. sButton7.Visible:=(True);
  1305. end
  1306. else begin
  1307. //if not tr2.Position = 0 then begin
  1308. sButton6.Visible:=(True);
  1309. sButton7.Visible:=(False);
  1310. end;
  1311. end;
  1312.  
  1313. procedure TForm1.SimgeDurumunaKlt1Click(Sender: TObject);
  1314. begin
  1315. Application.Minimize; //taskbar'a minimize
  1316. CloseWindow(handle);
  1317. //WindowState := wsMinimized;
  1318. end;
  1319.  
  1320. procedure TForm1.sSkinManager1AfterChange(Sender: TObject);
  1321. Var
  1322. TexT: TextFile;
  1323. begin
  1324. AssignFile(TexT, GetAppPath4);
  1325. FileMode := 2; // Read & Write
  1326. ReWrite(TexT);
  1327. WriteLn(TexT, sSkinManager1.Skinname);
  1328. CloseFile(TexT);
  1329. end;
  1330.  
  1331.  
  1332. procedure TForm1.sLabel5Click(Sender: TObject);
  1333. begin
  1334. tr2.Position:=64;
  1335. setwavevolume(64);
  1336. end;
  1337.  
  1338. procedure TForm1.sLabel12Click(Sender: TObject);
  1339. begin
  1340. tr2.Position:=193;
  1341. setwavevolume(193);
  1342. end;
  1343.  
  1344. procedure TForm1.sButton6Click(Sender: TObject);
  1345. begin
  1346. tr2.Position:=0;
  1347. SetMediaAudioOff(MediaPlayer1.DeviceId);
  1348. sButton7.Visible:=(True);
  1349. sButton6.Visible:=(False);
  1350. end;
  1351.  
  1352. procedure TForm1.sButton7Click(Sender: TObject);
  1353. begin
  1354. tr2.Position:=127;
  1355. SetMediaAudioOn(MediaPlayer1.DeviceId);
  1356. sButton7.Visible:=(False);
  1357. sButton6.Visible:=(True);
  1358. end;
  1359.  
  1360. procedure TForm1.ListBox2DragDrop(Sender, Source: TObject; X, Y: Integer);
  1361. begin
  1362. with (Sender as TListBox) do
  1363.     Items.Move(ItemIndex,ItemAtPos(Point(x,y),True));
  1364. end;
  1365.  
  1366. procedure TForm1.ListBox2DragOver(Sender, Source: TObject; X, Y: Integer;
  1367.   State: TDragState; var Accept: Boolean);
  1368. begin
  1369.  Accept := (Sender=Source);
  1370. end;
  1371.  
  1372. procedure TForm1.ListBox2MouseDown(Sender: TObject; Button: TMouseButton;
  1373.   Shift: TShiftState; X, Y: Integer);
  1374. begin
  1375.  Secili:= true;
  1376.   ii:= ListBox1.ItemIndex;
  1377.   ii:= ListBox2.ItemIndex;
  1378. end;
  1379.  
  1380. procedure TForm1.ListBox2MouseMove(Sender: TObject; Shift: TShiftState; X,
  1381.   Y: Integer);
  1382.  var
  1383.   p:TPoint;
  1384. begin
  1385.      listbox1.ItemIndex:=Listbox2.ItemIndex;
  1386. i:= ListBox1.ItemAtPos(Point(x,y), True);
  1387. i:= ListBox2.ItemAtPos(Point(x,y), True);
  1388.   if (ii=i) then
  1389.     Exit;
  1390.   if secili then
  1391.     if (i=(ii-1)) or (i=(ii+1)) then
  1392.     begin
  1393.       secili:= false;
  1394.       listbox1.ItemIndex:=Listbox2.ItemIndex;
  1395.       ListBox1.Items.Move(ii, i);
  1396.       ListBox2.Items.Move(ii, i);
  1397.       ii:= i;
  1398.       Secili:= true;
  1399.  
  1400.  
  1401.     end;
  1402.  
  1403. end;
  1404.  
  1405. procedure TForm1.ListBox2MouseUp(Sender: TObject; Button: TMouseButton;
  1406.   Shift: TShiftState; X, Y: Integer);
  1407. begin
  1408.  secili:= false;
  1409.   ListBox1.Cursor:= crDefault;
  1410.   ListBox2.Cursor:= crDefault;
  1411. end;
  1412.  
  1413. procedure TForm1.MiniOynatcyaGe1Click(Sender: TObject);
  1414. begin
  1415. if tr.Enabled= False then
  1416. begin
  1417. Application.MessageBox('Şarkı Açmadan Mini Oynatıcıyı Açamassınız.','Uyarı!', mb_Ok or Mb_IconError);
  1418. exit;
  1419. end
  1420. else
  1421. begin
  1422. Form1.Hide;
  1423. Form4.Show;
  1424. end;
  1425. end;
  1426.  
  1427. end.
« Son Düzenleme: 11 Temmuz 2008 23:53:35 by Kocaturk »

Çevrimdışı cLaW

  • Kıdemli Üye
  • *****
  • İleti: 351
  • Rep: +3/-0
  • Cinsiyet: Bay
    • CMP
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #1 : 25 Nisan 2008 14:39:13 »
acemice bir program ama :D bir kaç arkadaş istedi bende 1.5 versionunu paylaşım dedim proje halinde isteyen olursa söylesin :)

Çevrimdışı RewriteRule

  • Kıdemli Üye
  • *****
  • İleti: 333
  • Rep: +7/-1
  • Cinsiyet: Bay
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #2 : 25 Nisan 2008 21:41:37 »
cLaW sen nerelerdesin? Projelere mi daldın yoksa?

Çevrimdışı Subhan

  • Kıdemli Üye
  • *****
  • İleti: 818
  • Rep: +1/-0
  • Cinsiyet: Bay
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #3 : 26 Nisan 2008 11:25:16 »
acemice bir program ama :D bir kaç arkadaş istedi bende 1.5 versionunu paylaşım dedim proje halinde isteyen olursa söylesin :)


Proje hali harsa versene cLaW  proje hali kolay oluyor kodu anlamak  bir suru kod var projede adamin akli karisir valahi
En Güzel Azeri Programlama Sitesi.

Proqramlasdirma.Com

Çevrimdışı cLaW

  • Kıdemli Üye
  • *****
  • İleti: 351
  • Rep: +3/-0
  • Cinsiyet: Bay
    • CMP
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #4 : 04 Mayıs 2008 11:21:05 »
cLaW sen nerelerdesin? Projelere mi daldın yoksa?

yok yaw ne yazıkki iş hayatına daldım :D haftada 1 - 2 kez foruma uğruyorum ancak

alpha skins kuruluımu çok basit acntD7_R.dpk compile olacak diğeri ise acntD7.dpk install olacak tabi libraryye ekledikten sonra subhan ama ben bunu d7 için anlattım :d

Çevrimdışı Subhan

  • Kıdemli Üye
  • *****
  • İleti: 818
  • Rep: +1/-0
  • Cinsiyet: Bay
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #5 : 04 Mayıs 2008 19:38:18 »
cLaw karden sen bu programi kac gune yapdin adamin akli karisiyo ne kadar kod yazdin buna sen
En Güzel Azeri Programlama Sitesi.

Proqramlasdirma.Com

Çevrimdışı cLaW

  • Kıdemli Üye
  • *****
  • İleti: 351
  • Rep: +3/-0
  • Cinsiyet: Bay
    • CMP
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #6 : 11 Temmuz 2008 08:30:39 »
Sorma :D 500 üzerinde baya satır vardır :) proje olarak atıyorum linki konuya :)

Çevrimdışı Subhan

  • Kıdemli Üye
  • *****
  • İleti: 818
  • Rep: +1/-0
  • Cinsiyet: Bay
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #7 : 11 Temmuz 2008 11:43:39 »
Sorma :D 500 üzerinde baya satır vardır :) proje olarak atıyorum linki konuya :)

cLaW ben senin projeni burakdım ben kendi kendime dedim ki ben kendi emeyimle kendi programımı
yapıcam

Ben DenızSoft Mp3 Player V1.2 Versionunu çok yakında biticek ve siteye koyucam
çok güzel tasarladım hem de hiç bir komponent kulanmadan  1 haftaya hazırdır
Benşm Programda 1394 satır sadece form1-de var (bir sürü özelşk koydum bu kadarda lucak artık)
En Güzel Azeri Programlama Sitesi.

Proqramlasdirma.Com

Çevrimdışı ogretmen14

  • Yeni Üye
  • *
  • İleti: 1
  • Rep: +0/-0
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #8 : 07 Kasım 2008 01:58:01 »
merhaba claw mp3 playerın proje halini isteyen varsa gönderebileceğini söylemişsin. gönderebilirmisin ? tez için ugrasıyorum da açık projene ihtiyacım var izninle. şimdidden teşekkürler.

Çevrimdışı mmt_dmrl

  • Yeni Üye
  • *
  • İleti: 1
  • Rep: +0/-0
Ynt: cLaW MP3 Player V1.5 Kaynak Kodu
« Yanıtla #9 : 29 Kasım 2008 00:04:37 »
ya bu delphi adamı öldürür kafam allak bullak oldu yine:@