Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Put an Icon in a WSH Script?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00478045
Message ID:
00478876
Views:
27
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform