procedure TForm1.Button1Click(Sender: TObject);
var FileExt:string;
begin
if opendialog1.Execute and mode then
begin
fileext:=AnsilowerCase( extractFileExt(opendialog1.FileName))
if FileExt='.rm' then
begin
realaudio1.Source:=opendialog1.FileName;
mode:=false;//自定义
end
else
begin
mediaplayer1.filename:=opendialog1.filename;
mode:=false;
end;
end;
end;