专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > PB

小弟我在按键中调用一个WORD不成功

发布时间:2011-06-29 18:31:09 文章来源:www.iduyao.cn 采编人员:星星草
我在按键中调用一个WORD不成功
long ll_result
string ls_operation,ls_Parameters,ls_file


ls_Operation = "open"
ls_Parameters = ""
ls_file ="aa.doc"



ll_result = ShellExecute("",ls_Operation,ls_file, ls_Parameters,"d:\",9)

ShellExecute("0","open","calc.exe","","",0)


我在按键中调用一个WORD不成功

------解决方案--------------------
方法写的不对吧,请参考以下代码

string    ls_oper, ls_path, ls_parm
integer  li_value, li_style

SetNull(ls_Parm)
ls_oper = "Open"
ls_path = 'c:\1.txt'
li_style= 1 //Normal = 1, Minimize = 2, Maximize =3
li_value = ShellExecuteA(Handle(This), ls_oper, ls_path, ls_parm, ls_parm, li_style)

//PB10声明
Function ulong ShellExecuteA(ulong hwnd, ref string lpOperation, ref string lpFile, ref string lpParameters, ref string lpDirectory, int iShowCmd) Library "Shell32.DLL" ALIAS FOR "ShellExecuteA;ANSI"

//PB7,8,9声明
Function ulong ShellExecuteA(ulong hwnd, ref string lpOperation, ref string lpFile, ref string lpParameters, ref string lpDirectory, int iShowCmd) Library "Shell32.DLL" ALIAS FOR "ShellExecuteA"
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: