//播放器
import win.ui;
/*DSG{{*/
var winform = win.form(parent=...; bgcolor=16576749;bottom=227;right=337;border="resizable";text="AAuto Form" )
winform.add( 
static={ dr=1;dl=1;bottom=165;text="";left=32;dt=1;top=16;right=308;z=1;db=1;transparent=1;edge=1;cls="static" };
btnDump={ dr=1;bottom=205;right=318;left=230;top=178;z=4;db=1;text="显示成员";cls="button" };
btnStop={ dr=1;bottom=205;right=219;left=131;top=178;z=3;db=1;text="停止";cls="button" };
btnPlay={ dr=1;bottom=205;right=115;left=27;top=178;z=2;db=1;text="播放";cls="button" }
)
/*}}*/

//创建控件
wmplay = com.CreateEmbed( {} ,winform.static,"{6BF52A52-394A-11d3-B153-00C04F79FAA6}") 
//wmplay = com.CreateEmbed( {} ,winform.static,"MediaPlayer.MediaPlayer") 

wmplay._object.Url  = "http://zhangmenshiting.baidu.com/service/a401799ff13071c881685a0d087a6c43.mp3?xcode=39a942cab41dd7d1071ffa1269adcc9121"

winform.btnStop.oncommand = function(id,event){ 
    wmplay._object.controls.stop() 
}
winform.btnPlay.oncommand = function(id,event){ 
    wmplay._object.controls.play()
}
winform.btnDump.oncommand = function(id,event){
    io.open()
    com.DumpTypeInfo(wmplay._object) 
    execute("pause") //按任意键继续
    io.close();//关闭控制台
} 

winform.show(true) 
win.loopMessage();
return winform;

//参考:http://msdn.microsoft.com/en-us/library/aa392419(VS.85).aspx
