Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intranet Help
Message
From
02/02/2002 06:46:31
 
 
To
28/01/2002 17:49:53
Chuck Berry
Copper State Bolt & Nut Co.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00611943
Message ID:
00614370
Views:
14
This message has been marked as the solution to the initial question of the thread.
How would I map the F1 key to launch a default page on an intranet?

Use command like the folowing:
ON KEY LABEL F1 DO MyHelpEngine.prg
In MyHelpEngine.prg it is supposed that you launch internet browser to navigate to a given page.
This can be done with the ShellExecute Platform SDK (AKA WinApi) command
DECLARE INTEGER ShellExecute IN SHELL32.DLL;
	INTEGER vnWinHandle,;		&& 0
	STRING vcOperation,;		&& [OPEN] / [PRINT] / [EXPLORE] / NULL
	STRING vcFileName,;
	STRING vcParameters,;		&& NULL
	STRING vcDirectory,;
	INTEGER vnShowWindow	&& 5/8/0 && SW_SHOW/SW_SHOWNA/SW_DOCUMENT
Example of usage:
ShellExecute(0, [OPEN], 'http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~?2,15,611943', NULL, '', 5)
Can I add context-sensitivity?

Yes you can - just use the HelpContextID property of the VFP native controls. The above ShellExecute than will be changed to something like this:
ShellExecute(0, [OPEN], 'http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~?2,15,'+transform(_Screen.ActiveForm.ActiveControl.HelpContextID), NULL, '', 5)
HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Reply
Map
View

Click here to load this message in the networking platform