win7下Help命令如何使用
在winxp+VFP9环境下开发了一套系统其中一个表单的init事件中写入:
set help on
set help to myhelp.chm
表单上放置了一个按钮cmd_help,在cmd_help.click中写入:
help
连编成exe文件后,安装在winxp的机器中,点击cmd_help或按F1键,能调出帮助窗口,运行正常。安装在win7的机器中,点击cmd_help或按F1键均无反应,也不产生错误信息。如何解决?
CLEAR DECLARE LONG GetProcessHeap IN Kernel32 DECLARE LONG HeapAlloc IN Kernel32 LONG, LONG, LONG DECLARE LONG HeapFree IN Kernel32 LONG, LONG, LONG DECLARE LONG TerminateProcess IN Kernel32 LONG, LONG DECLARE LONG ShellExecuteEx IN Shell32 STRING@ szFile = "c:\program files (x86)\microsoft visual foxpro 9\dv_foxhelp.chm" dhFile = HeapAlloc(GetProcessHeap(), 8, LEN(szFile)) SYS(2600, dhFile, LEN(szFile), szFile) stSEI = BINTOC(60, "4RS"); + BINTOC(0x40, "4RS") + REPLICATE(0h00, 8); + BINTOC(dhFile, "4RS") + REPLICATE(0h00, 8); + BINTOC(1, "4RS") + REPLICATE(0h00, 28) ShellExecuteEx(@stSEI) HeapFree(GetProcessHeap(), 8, dhFile) dhProcess = CTOBIN(RIGHT(stSEI, 4), "4RS") ** 3秒后关闭 INKEY(3) TerminateProcess(dhProcess, 0) CLEAR DLLS RETURN
CLEAR #DEFINE STILL_ACTIVE 259 DECLARE LONG GetProcessHeap IN Kernel32 DECLARE LONG HeapAlloc IN Kernel32 LONG, LONG, LONG DECLARE LONG HeapFree IN Kernel32 LONG, LONG, LONG DECLARE LONG GetExitCodeProcess IN Kernel32 LONG, LONG@ DECLARE LONG ShellExecuteEx IN Shell32 STRING@ szFile = "c:\program files (x86)\microsoft visual foxpro 9\dv_foxhelp.chm" dhFile = HeapAlloc(GetProcessHeap(), 8, LEN(szFile)) SYS(2600, dhFile, LEN(szFile), szFile) stSEI = BINTOC(60, "4RS"); + BINTOC(0x40, "4RS") + REPLICATE(0h00, 8); + BINTOC(dhFile, "4RS") + REPLICATE(0h00, 8); + BINTOC(1, "4RS") + REPLICATE(0h00, 28) ShellExecuteEx(@stSEI) HeapFree(GetProcessHeap(), 8, dhFile) dhProcess = CTOBIN(RIGHT(stSEI, 4), "4RS") ** 5秒后检测是否已经关闭 INKEY(5) ddExitCode = 0 GetExitCodeProcess(dhProcess, @ddExitCode) ? IIF(ddExitCode == STILL_ACTIVE, "已打开", "已关闭") CLEAR DLLS RETURN