Probleme avec un raccourci

cs_Sipadan Messages postés 125 Date d'inscription lundi 5 août 2002 Statut Membre Dernière intervention 23 novembre 2011 - 30 sept. 2002 à 07:03
spyder66 Messages postés 1 Date d'inscription mardi 10 juin 2003 Statut Membre Dernière intervention 10 juin 2003 - 10 juin 2003 à 22:43
Bonjour,
Mon appli doit créer un raccourci dans le menu démarrer.
Quand je teste sous vb6 le raccourci est créé, mais une fois mon appli compilée, elle ne créé pas le raccourci. voici mon code:
Dans un module
Declare Function OSfCreateShellLink Lib "vb6stkit.dll" Alias "fCreateShellLink" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String, ByVal fPrivate As Long, ByVal sParent As String) As Long

Call OSfCreateShellLink("C:\windows\menu démarrer\bouton", "Bouton", Text1.Text & "\bouton.exe", "", 0, "")
:(

3 réponses

cs_rene38 Messages postés 1858 Date d'inscription samedi 29 juin 2002 Statut Membre Dernière intervention 17 octobre 2013 11
30 sept. 2002 à 11:50
La variable lpstrLinkPath ne doit pas contenir de guillemets. Essaie avec
Chemin = Text1.Text & "\bouton.exe"
Call OSfCreateShellLink("C:\windows\menu démarrer\bouton", "Bouton", Chemin, "", 0, "")
0
cs_Sipadan Messages postés 125 Date d'inscription lundi 5 août 2002 Statut Membre Dernière intervention 23 novembre 2011
30 sept. 2002 à 23:30
Ben non, la vb n'en veut meme pas. Tu n'as pas une autre solution?
0
spyder66 Messages postés 1 Date d'inscription mardi 10 juin 2003 Statut Membre Dernière intervention 10 juin 2003
10 juin 2003 à 22:43
-------------------------------
Réponse au message :
-------------------------------

> Bonjour,
> Mon appli doit créer un raccourci dans le menu démarrer.
> Quand je teste sous vb6 le raccourci est créé, mais une fois mon appli compilée, elle ne créé pas le raccourci. voici mon code:
> Dans un module
> Declare Function OSfCreateShellLink Lib "vb6stkit.dll" Alias "fCreateShellLink" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String, ByVal fPrivate As Long, ByVal sParent As String) As Long
>
> Call OSfCreateShellLink("C:\windows\menu démarrer\bouton", "Bouton", Text1.Text & "\bouton.exe", "", 0, "")
> :(
0
Rejoignez-nous