General information
Category:
Windows API functions
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only