PC Review


Reply
Thread Tools Rate Thread

Control desktop Icon

 
 
Snowfire
Guest
Posts: n/a
 
      2nd Feb 2008
I am using this code to create a launch icon on the desktop..

Sub Desktopshortcut()
Dim WSHShell As Object
Dim MyShortcut As Object
Dim DesktopPath As String
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set MyShortcut = WSHShell.CreateShortcut(DesktopPath &
"\EngstoreSpecial.lnk")
With MyShortcut
.TargetPath = LocalPathExcelControlSpecial
.Save
End With
Set WSHShell = Nothing
End Sub

Is it possible to control the symbol so a pre-determined picture icon
can be used?
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      2nd Feb 2008
With myShortcut
.IconLocation = "x:\somefolder1\somefolder2\someicon.ico"
...



Snowfire wrote:
>
> I am using this code to create a launch icon on the desktop..
>
> Sub Desktopshortcut()
> Dim WSHShell As Object
> Dim MyShortcut As Object
> Dim DesktopPath As String
> Set WSHShell = CreateObject("WScript.Shell")
> DesktopPath = WSHShell.SpecialFolders("Desktop")
> Set MyShortcut = WSHShell.CreateShortcut(DesktopPath &
> "\EngstoreSpecial.lnk")
> With MyShortcut
> .TargetPath = LocalPathExcelControlSpecial
> .Save
> End With
> Set WSHShell = Nothing
> End Sub
>
> Is it possible to control the symbol so a pre-determined picture icon
> can be used?


--

Dave Peterson
 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      2nd Feb 2008
Yes you can do that, try this

With MyShortcut
.TargetPath = LocalPathExcelControlSpecial
.IconLocation = "%SystemRoot%\system32\SHELL32.dll, 22"
.Save
End With

Now finding out precisely which is which icon in Shell32.dll is something
you'll have to Google for but change the 22 to change to Icon

Mike



"Snowfire" wrote:

> I am using this code to create a launch icon on the desktop..
>
> Sub Desktopshortcut()
> Dim WSHShell As Object
> Dim MyShortcut As Object
> Dim DesktopPath As String
> Set WSHShell = CreateObject("WScript.Shell")
> DesktopPath = WSHShell.SpecialFolders("Desktop")
> Set MyShortcut = WSHShell.CreateShortcut(DesktopPath &
> "\EngstoreSpecial.lnk")
> With MyShortcut
> .TargetPath = LocalPathExcelControlSpecial
> .Save
> End With
> Set WSHShell = Nothing
> End Sub
>
> Is it possible to control the symbol so a pre-determined picture icon
> can be used?
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Panel Icon on Desktop Ken Windows Vista General Discussion 6 17th Feb 2008 08:52 PM
Cant delete Control Panel Desktop Icon on Taskbar =?Utf-8?B?Sm9rZXI=?= Windows Vista General Discussion 11 1st Jun 2007 05:53 AM
Help - I Keep Losing Desktop - Control Panel Icon! wee@willy.com Windows XP Customization 0 15th Sep 2004 09:27 AM
I Keep Losing Desktop - Control Panel Icon! wee@willy.com Windows XP Customization 0 13th Sep 2004 01:44 PM
Re: Duplicate Icon in Control Panel - Missing Icon from Desktop Kelly Windows XP General 1 27th Jul 2003 08:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:31 AM.