编程论坛
注册
登录
编程论坛
→
VFP论坛
使用命令 打开文件
aroffice
发布于 2023-02-14 13:22, 677 次点击
在VFP中如何使用系统默认的软件打开一个指定的文件
相当于找到这个文件,双击打开
比如打开 D:\test.xls
2 回复
#2
吹水佬
2023-02-14 13:44
ShellExecute 的 "open"
#3
sdta
2023-02-14 13:58
程序代码:
Declare
Integer
ShellExecute
In
shell32.dll
Integer
,String,String,String,String,
Integer
Declare
Integer
GetDesktopWindow
In
Win32api
*
lcFile
=
"D:\Fc.ico"
lcFile
=
"D:\a1.xls"
lnWnd
=
GetDesktopWindow()
=
Shellexecute(lnWnd,"
open
",lcFile,"","D:\",
1
)
Clear dlls
1