Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" ( _ ByVal lpstrCommand As String, _ ByVal lpstrReturnString As String, _ ByVal uReturnLength As Integer, _ ByVal hwndCallback As Integer) As Integer
操作内容 | コマンド文字列 | 補足説明 |
---|---|---|
デバイスのオープン | open [filename] (alias %s) | --- |
再生 | play %s (notify) | --- |
停止 | stop %s | --- |
デバイスのクローズ | close %s | --- |
一時停止 | pause %s | --- |
一時停止の再開 | resume %s | --- |
タイムフォーマットをミリ秒にする | set %s time format milliseconds | millisecondsはmsと表記してもよい。 |
現在位置の移動 | seek %s to [移動位置] | 移動位置には0以上の値の他、startやendも指定で きる。 |
再生時間の取得 | status %s length | 第2引数に再生時間を表す文字列が返る。 |
現在位置の取得 | status %s position | 第2引数に現在位置を表す文字列が返る。 |
現在の状態を取得 | status %s mode | 第2引数に現在の状態を表す文字列が返る。 playing : 再生中 stopped : 停止中 paused : 一時停止中 |
フォームを追加し、下記のコントロールを配置