全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:914
推到 Plurk!
推到 Facebook!

音樂檔時間??

尚未結案
dickhomepage
一般會員


發表:14
回覆:5
積分:3
註冊:2005-01-18

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-01-21 21:10:18 IP:218.165.xxx.xxx 未訂閱
請問大家Label 1~3 IntToStr(HIBYTE(LOWORD(TheLength))) 什麼是HIBYTE及LOWWORD這有什麼關係呢?? 而且我用BCB6.0做出來的好像65秒才1分鐘?? 這要如何解決?? 還是有什麼可以解決直接用LABEL執行出秒.分.時的時間出來?? void __fastcall TForm1::Button1Click(TObject *Sender) { int TheLength; // Set time format - note that some devices don't support tfHMS MediaPlayer1->TimeFormat = tfHMS; // current position of media TheLength = MediaPlayer1->Position; // display hours in label 1 Label1->Caption = IntToStr(LOBYTE(LOWORD(TheLength))); // display minutes in label 2 Label2->Caption = IntToStr(HIBYTE(LOWORD(TheLength))); // display the seconds in label 3 Label3->Caption = IntToStr(LOBYTE(HIWORD(TheLength))); }
ys168
初階會員


發表:3
回覆:24
積分:25
註冊:2005-10-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2006-08-13 20:11:10 IP:59.115.xxx.xxx 未訂閱

// 使用: Label1->Caption = _timeString(MediaPlayer1->Length);

AnsiString TForm1::_timeString(int Time)
{
String Buffer;
int Minutes = Time/60000;
int Seconds = (Time/1000)`;
Buffer.sprintf("%.2i:%.2i",Minutes,Seconds);
return Buffer;
}

//--------------------------------------------------------

------
yangshuh
系統時間:2024-05-06 13:34:06
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!