Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a shortcut for my application in the deskt
Message
From
27/05/1998 11:31:28
 
 
To
27/05/1998 05:50:13
Carla Silva
Http - Produtos Informaticos, Lda.
Odivelas, Portugal
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00102277
Message ID:
00102384
Views:
39
You can check advisor magazine or the following code works in VFP 5 ( not sure about VFP3, but requires the use of a VB DLL, no problem if you have Visual Studio)

*
* Routine to manipulate (add,edit,delete) SHORTCUTS (SHELL LINKS)
*
* Requires the use of STKIT432.DLL a vb DLL, ensure to distribute it with
* your application
*
* This dll can be used to create shortcuts,
* on the user's desktop,
* in the Program Menu group,
* in the Startup group,
* or execute the shortcut from within your application
*
* Shortcuts can be created for any file type, not just EXEs,COMs, and objects
* such as printers
*
* API Function fCreateShellLink
* Requires 4 arguments
* lpstrFolderName - Where you want to create the shell link
* This location is relative to the Programs folder on the Start menu
* lpstrLinkName - The text you want to appear with the shell link's icon
* Keep it short and descriptive to the user
* lpstrLinkPath - The full pathname to the file you are creating the shell link for
* lpstrLinkArgs - any arguments requrired by the lpstrLinkPath argument
* such as creating a shell link to a specific text file
* Whenever calling this function ensure that all arguments are valid as shell links can
* not be created to files that do not exist

DECLARE INTEGER fCreateShellLink in STKIT432.DLL ;
STRING lpstrFolderName,;
STRING lpstrLinkName,;
STRING lpstrLinkPath,;
STRING lpstrLinkArgs
*
* To create a shell link on the desktop the folder name is '..\..\DeskTop' ( 95 & NT 4.0 )
? fCreateShellLink('..\..\DeskTop','test','NOTEPAD','C:\billing.TXT')
* To create a shell link on the START menu, though not obvious set the
* fCreateShellLink creates shell links relative to the Start menu's
* programs folder (usually: \Windows\Start Menu\Programs folder) it's easy to
* see a that a shortcut can be created anywhere on the disk simply by
* specifying a folder location in the lpstrFolderName argument
? fCreateShellLink('','Test','NOTEPAD','c:\billing.txt')
*
* To remove a previously created shell link use the fRemoveShellLink
*
DECLARE INTEGER fRemoveShellLink in STKIT432.DLL ;
STRING lpstrFolderName,;
STRING lpstrLinkName
? fRemoveShellLink('..\..\DeskTop','test')
Previous
Reply
Map
View

Click here to load this message in the networking platform