1.
procedure TForm1.BitBtn1Click(Sender: TObject);
var
h,m,s,ss : integer;
begin
if openDialog1.Execute then
begin
MediaPlayer1.FileName := OpenDialog1.FileName;
mFileName.Caption := ExtractFileName(OpenDialog1.FileName);
MediaPlayer1.Open;
MediaPlayer1.TimeFormat := tfFrames;
TrackBar1.Max := MediaPlayer1.Length;
TrackBar1.Position := MediaPlayer1.Position;
mTotFrame.Caption :=
FormatFloat('##,###,###,###,##0',MediaPlayer1.Length);
mPlayFrame.Caption :=
FormatFloat('##,###,###,###,##0',MediaPlayer1.Position);
MediaPlayer1.TimeFormat := tfMilliseconds;
ss := MediaPlayer1.Length div 1000;
s := ss mod 60;
m := ss div 60;
h := m div 60;
m := m mod 60;
mTime00.Caption:= FormatFloat('00:00:00',0);
mTime01.Caption:= FormatFloat('00',h)+':'+FormatFloat('00',m)+':'
+FormatFloat('00',s);
end;
end;
2.
procedure TForm1.MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
var DoDefault: Boolean);
begin
case Button of
btPlay : begin
Timer1.Enabled := true;
StatusBar1.Panels[0].Text := '재생'
end;
btPause : StatusBar1.Panels[0].Text := '잠시멈춤';
btStop : StatusBar1.Panels[0].Text := '재생중지';
btNext : StatusBar1.Panels[0].Text := '다음';
btPrev : StatusBar1.Panels[0].Text := '이전';
btStep : StatusBar1.Panels[0].Text := '앞으로';
btBack : StatusBar1.Panels[0].Text := '뒤로';
end;
end;
글자수를 크게해놓은부분에서 오류가 나는데요 1번은 Open비트버튼을눌러 파일을불러오려하는데 mFileName과 Caption이 빨간글자가되구요 2번은 잠시멈춤과 재생중지에선 문제없이 되는데 글자수 큰부분에서 빨간글자없이 오류가 나는것 같더라구요..좀 고쳐주세요