My Visual Studio 2010 VB.NET program creates a shortcut to an ACAD.EXE file. I want to use the out-of-the-box AutoCAD icon image. The default path to the icon image is:
I use the following methodology:
Dim objShellClass As New IWshRuntimeLibrary.IWshShell_Class Dim objShortcut As IWshRuntimeLibrary.IWshShortcut
objShortcut = CType(objShellClass.CreateShortcut(strPathFile), IWshRuntimeLibrary.IWshShortcut)
.Arguments = strArguments
.Description = strName
.IconLocation = strIconLocation
.TargetPath = strTargetPath
.WindowStyle = IWshRuntimeLibrary.WshWindowStyle.WshNormalFocus
.WorkingDirectory = strWorkingDirectory
Everything works fine except the shortcut image is blank. When I right-click on it and select properties, then Change Icon... it is pointing to the correct icon image. If I select OK and OK the icon image appears on the shortcut.
Why does the image NOT appear when the shortcut is initially created?
Solved! Go to Solution.
Solved! by rpearsall. See the answer in context.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!