7
701004158
Unregistered / Unconfirmed
GUEST, unregistred user!
MP3小程序,源码如下:<br>unit main;<br>interface<br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls, Menus, ComCtrls, ExtCtrls, MPlayer;<br>type<br> Tfrm_main = class(TForm)<br> MediaPlayer1: TMediaPlayer;<br> Timer1: TTimer;<br> Image1: TImage;<br> OpenDialog1: TOpenDialog;<br> MainMenu1: TMainMenu;<br> TrackBar1: TTrackBar;<br> TrackBar2: TTrackBar;<br> StatusBar1: TStatusBar;<br> N1: TMenuItem;<br> N2: TMenuItem;<br> N3: TMenuItem;<br> Label1: TLabel;<br> N4: TMenuItem;<br> N5: TMenuItem;<br> N6: TMenuItem;<br> N7: TMenuItem;<br> N8: TMenuItem;<br> N9: TMenuItem;<br> N10: TMenuItem;<br> N11: TMenuItem;<br> Label2: TLabel;<br> procedure N4Click(Sender: TObject);<br> procedure N5Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br>var<br> frm_main: Tfrm_main;<br>implementation<br>{$R *.dfm}<br>procedure Tfrm_main.N4Click(Sender: TObject);<br>begin<br> if opendialog1.Execute then<br> begin<br> mediaplayer1.FileName := opendialog1.FileName ;<br> try<br> mediaplayer1.Open ;<br> except<br> showmessage('you can not open it!');<br> end;<br> statusbar1.Panels[1].Text :='file time is:'+ inttostr(trackbar1.Max);<br> end; <br>end;<br><br>procedure Tfrm_main.N5Click(Sender: TObject);<br>begin<br> mcisendstring('set all audio all on',nil,0,handle);<br> //////////////////////////////////////////////////老是提示:mcisendstring未定义。怎么办?(mcisendstring为API函数)<br>end;<br><br>end.