by Drew (4 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (11 Votes)
Creates a Windows Shortcut to a program executable, and places it on the Desktop, Start Menu, or a Start Menu subfolder.
Inputs
frm - A form to hook onto.
strGroupName - The name of the Group where this shortcut
will be placed. By default, this group is
always placed in the 'Start Menu/Programs' folder.
You can pass '..\..\Desktop' to put this on
the Desktop, or '..' to put this on the 'Start Menu'.
strLinkName - Text caption for the Shortcut link.
strLinkPath - Full path to the target of the Shortcut link.
Ex: 'c:\Program Files\My Application\MyApp.exe'
strLinkArguments - Command-line arguments for the Shortcut link.
Ex: '-f -c "c:\Program Files\My Application\MyApp.dat" -q'
Assumes
The Windows API/Global Declarations section and the code should be placed in the same bas module. Preferable it's own module because there are a lot of functions need to check the platform your using, convert short filenames, create menu folders/groups ect...
Code Returns
Nothing