我在powerbuilder 9.0中declare了全局函数mciSendString
然后在一个窗口对象中添加了一个按钮,在按钮的clicked事件中写如下的东西。
编译通过然后运行点击该按钮时报 bad runtime function reference at line 5……
string ls_command,ls_buffer,ls_filename
ls_filename="111.avi"
ls_buffer=fill(Char(0),255)
ls_command="open" + ls_filename + "type avivideo alias avi"
mciSendString(ls_command,ls_buffer,255,handle(parent))
ls_command="play mp3"
mciSendString(ls_command,ls_buffer,255,handle(parent))
请高手们帮忙解决下,多谢了!
还有我想问在powerbuilder中能不能调用createprocess函数?
------解决方案--------------------
前后加个空格试试
string ls_command,ls_buffer,ls_filename
ls_filename="111.avi"
ls_buffer=fill(Char(0),255)
ls_command="open " + ls_filename + " type avivideo alias avi"
mciSendString(ls_command,ls_buffer,255,handle(parent))
ls_command="play mp3"
mciSendString(ls_command,ls_buffer,255,handle(parent))