| |

VerySource

 Forgot password?
 Register
Search
View: 3850|Reply: 11

How to call the help file in VFP

[Copy link]

1

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2021-3-8 18:00:01
| Show all posts |Read mode
How to call the help file in VFP I wrote a help file named HELP.chm with a tool. I want to call it in the order column. How can I call it?
Reply

Use magic Report

0

Threads

32

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2021-3-8 20:00:02
| Show all posts
SET HELP TO path+'HELP.chm'
SET HELP ON

Then press F1 to call
Reply

Use magic Report

1

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2021-3-8 20:30:01
| Show all posts
In this way, you can call it by pressing F1, but I can't call it by clicking the menu bar. . How can it be solved?170385215
Reply

Use magic Report

1

Threads

19

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2021-3-8 23:00:01
| Show all posts
See if there is a problem with the path when the menu is called
Reply

Use magic Report

1

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2021-3-9 10:45:02
| Show all posts
There is no problem with the path. . It just can’t be called out, only press F1 to call out
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-9 11:00:01
| Show all posts
The help file I use is this:
run "help.chm"
run exit
It's okay, click directly to come out.
Reply

Use magic Report

1

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2021-3-9 11:15:01
| Show all posts
Set Help To SYS(5)+SYS(2003)+"\"+'HELLP.CHM' or Set Help To'HELLP.CHM'
Set Help On
In this way, it can’t be recalled by clicking, but can be recalled by pressing F1


Run "HELLP.CHM"&&so that you can click it to bring up the CMD when you click it. EXE is also called
Run Exit

The above seeks a solution. . Hope the prawns enlighten me!

Thank you! !

Another problem is that I have seen a lot of people's programs, but their catalogs all put the tables in one folder, and the forms in another folder. What are the advantages of doing this separately? Isn’t it necessary to delete tables and other irrelevant files in the project package? If you put each type in a different folder separately, and add the path of its folder when calling, wouldn't it be easier to make mistakes?
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2021-3-9 11:30:01
| Show all posts
Use API function, SHELLEXECUTE
Reply

Use magic Report

1

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2021-3-9 11:45:01
| Show all posts
How to use the API function SHELLEXECUTE? . . .
Reply

Use magic Report

0

Threads

32

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2021-3-9 12:00:01
| Show all posts
Please refer to:

How to call other programs in VFP
-------------------------------------------------- -----------
     
In VFP, we can use run to call the .exe file generated by VFP itself. Command format:
run c:\..\*.exe

    When calling the .exe file that is not generated by VFP itself, you need to add the absolute path and parameters.
Generally speaking, when VFP is used to run executable files that are not generated by VFP itself, a black window will be displayed. You can hide this window by adding /n. For example, to run a minesweeper game under Windows, the command format is as follows:
RUN/n C:\Windows\Winmine.exe
Let's run a more complicated program. Use word to open a word file named mlx.doc under c:\, the command format is as follows:
run /n3 C:\Program Files\Microsoft Office\Office\Winword.exe C:\mlx.doc
   Parameters: n hide the black window of VFP at runtime.
         3 means to run the program in a maximized manner. 1 Normal way, 2 Minimize way, 3 Maximize way

    In this case, although you can add parameters to make the program run smoothly, you still have to specify the absolute path. In actual development, we often cannot determine the file name and absolute path of the application that needs to be started. For example, in the above example, we cannot determine where the user's word is installed. If the user installs the word elsewhere, the above command will be wrong. Another example is a .gif file, some users like to open it with ACD See, some users like to open it with IE, and some users like to open it with Hero,...
    To understand this situation, we can call the Windows file link to open the file. That is, all files are opened with the default program of the system. This is necessary to call the Win32 API function of Windows. The calling method is as follows:

DECLARE INTEGER ShellExecute IN shell32.DLL INTEGER HWND,STRING lpszOP,STRING lpszFile,STRING lpszParams,STRING lpszDir,INTEGER fsshowcmd
DECLARE INTEGER GetDesktopWindow IN win32api
HWND = GetDesktopWindow()
lpszOP = "open"
* Specify the name of the file to be opened
lpszFile ="c:\mlx.doc"
lpszParams = ""
lpszDir = "c:\temp"
fsshowcmd = 1
* Execute ShellExecute command
LNRETURN = ShellExecute(HWND, lpszOP,lpszFile, lpszParams, lpszDir,fsshowcmd)

You can use any file name to replace c:\mlx.doc above. If Windows cannot find the corresponding related program under the specified file name, the program will not respond at this time. The relevant parameters can be modified on your own trial to achieve the best results.

-------------------------------------------------- -----------
Use of API function ShellExecute

ShellExecute
Explain that the Shellexecute function is used to execute a verb (verb) on a file. It is usually used to start an application associated with a specific file type. For example, to start Word to read a .doc file, or start Notepad to edit a .txt File. The most common verb used in the second parameter is "Open", but the other available verbs are "edit", "print", "explore" and "properties". Interestingly, use "mailto:" Or "http://" prefix, ShellExecute function can also be used to start the default mail reader with a given email address or start the default browser with a given URL.


Shrink the main file Shell32.dll

Definition in VFP
DECLARE INTEGER ShellExecute IN "Shell32.dll" INTEGER hwnd,STRING lpVerb,STRING lpFile,STRING lpParameters,STRING lpDirectory,LONG nShowCmd

Visual FoxPro application example
* Open Word to edit the file "c:\mywordfile.doc"
=Shellexecute(0,"Open","c:\mywordfile.doc","","",1)

* Open the default browser and locate the paradise forum
=Shellexecute(0,"Open","http://www.dbwin.net/bbs/index.asp?boardID=1&page=1","","",1)

* Open the default mail reader to send a letter to the paradise moderator
=Shellexecute(0,"Open","mailto:njjane@21cn.com","","",1)

* Print the text file "c:\mytextfile.txt"
=Shellexecute(0,"Print","c:\mytextfile.txt","","",1)
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list