Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Put an Icon in a WSH Script?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00478045
Message ID:
00478876
Vues:
28
Well, I have some WSH code (VBScript) stored in a table instead of coded into my VFP .exe (which has an icon already); when I want to execute the function, I read the script from the table, StrToFile() it to %temp%, and then use Ed Ruah's RunApp() stuff to let the code execute aynchronously. The problem is that the window shows the MSDOS icon. I want to keep the window so I can see if any errors occur in the script. I don't really want to make a shortcut, I just want to show a particular 16x16 icon when my.vbs runs.




>Do you mean a shortcut icon?
>if so I use this
>** MakeSC()
>LPARAMETERS tcLink, tcTargetPath, tcDescription, tcWorkingDirectory
>LOCAL loShell, loShortcut, lcDesktop
>loShell = CREATEOBJECT("WScript.Shell")
>lcDesktop = loShell.SpecialFolders("Desktop")
>loShortcut = loShell.CreateShortcut(lcDesktop + "\\" + tcLink + ".lnk")
>loShortcut.TargetPath = tcTargetPath
>loShortcut.WindowStyle = 1
>loShortcut.Description = tcDescription
>loShortcut.WorkingDirectory = tcWorkingDirectory
>loShortcut.Save()
>
>And the icon is carried over from the exe, I am also having icon problems
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform