Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create or Edit Desktop Shortcuts
Message
De
11/08/1997 14:21:24
 
 
À
11/08/1997 13:51:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00043984
Message ID:
00044050
Vues:
34
>>Does anyone know how to create or edit desktop shortcuts. I also need the same information about the start button menu.
>
>If you are using a Visual Studio or have access to Visual basic 4.0 or 5.0 this is easy to do. What you want to create are called Shell Links better known as Shortcuts. In visual basic there is a setup kit dll "STKIT432.DLL", this API contains functions for creating and removing shell links. Although this file is shipped with VB4 and VB5, it's important to distribute this dll on your setup disks or with you application in its home directory because not everyone who uses your application will necessarily have a copy of VB and / or this file on their computer system.
>
>The following declaration statement will usually do:
>
>DECLARE INTEGER fCreateShellLink;
> IN STKIT432.DLL;
> STRING @lpstrFolderName, ;
> STRING @lpstrLinkName, ;
> STRING @lpstrLinkPath,;
> STRING @lpStrLinkArgs
>
>As you can see from the declaration statement, the fCreateShellLink function requires four arguments.
>
>lpstrFolderName - The first argument is where you want to create the shell link. This location is relative to the Programs folder on the Start menu. You can create a shell link anywhere on a disk drive as long as that drive contains the Windows 95 Start menu.
> Eg: Desktop shell link (short cut) set lpstrFolderName = '..\..\DeskTop"
> Sehll link in the startup and program menu groups set lpstrFolderName = 'Startup'
> To create a shell link on the start menu set lpstrFolderName to Null
>
>lpStrLinkName - the second argument is the text you want to appear with the shell link's icon. (keep it short but as descriptive as possible)
>
>lpstrLinkPath - This should contain the full pathname to the file you are creating the shell link for.
>
>lpStrLinkArgs - The fourth argument is set to any arguments required by the lpstrLinkPath argument. If you're creating a shell link to the Notepad applet and you want to load a specific text file into Notepad, the the lpstrLinkArgs argument would contain the name of the text file you want to load.
>
>Here is an example of creating a shell link on the desktop after the dll is declared:
>
>? fCreateShellLink('..\..\Desktop','Bob test','c:\bootlog.txt','')
>
>This dll provides a great amount of flexibility to Visual Fox Pro setup wizard and classes very easily, explore your VB documentation for more ( some day microsoft may include this stuff with VFox, but we are always last on their list. )
>
>Robert Horkay

Thanks for the help! I greatly appreciate it!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform