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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only