Page 1 of 1

Application Bar update - Clearer Icons

Posted: Mon Jul 27, 2009 5:52 am
by imbeta
Hi,

OK I have made a small modification to the Application Bar which shows your shortcut icons without the annoying shortcut arrow on top of it so now they look nice crisp and clear like this:

Image

It doesnt work on absolutely every icon though, shortcuts to like 'C:\' still show the arrow but im working on it.

OK to modify the code you need to find these 2 sections in the code:
Code: Select all
Try
Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(line)
Dim s = ico.ToBitmap
w.Image = s
End Using
Catch
w.BackColor = Color.Aqua
End Try
Thats repeated twice in the code you already have. You need to replace those sections with the following code:
Code: Select all
               Try
                    Dim shortcut, starget As String
                    Dim oshelllink
                    Dim wsh As Object = CreateObject("WScript.Shell")
                    wsh = CreateObject("WScript.Shell")
                    shortcut = filename
                    oshelllink = wsh.CreateShortcut(shortcut)
                    starget = oshelllink.TargetPath
                    Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(starget)
                        Dim s = ico.ToBitmap
                        w.Image = s
                    End Using
                Catch ex As Exception
                    Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(filename)
                        Dim s = ico.ToBitmap
                        w.Image = s
                    End Using
                End Try
And thats it :) . Compile and test it out. Any problems please let me know.

Re: Application Bar update - Clearer Icons

Posted: Fri Sep 18, 2009 5:36 pm
by CodemaN
clapper; clapper; clapper; clapper;

Re: Application Bar update - Clearer Icons

Posted: Sun Oct 11, 2009 1:02 pm
by Neki
On mine Vista, all works. Great program!

Re: Application Bar update - Clearer Icons

Posted: Fri Jun 04, 2010 6:46 pm
by bfh13
looks good, better than the shortcut look

Re: Application Bar update - Clearer Icons

Posted: Sun Jun 27, 2010 9:07 pm
by XTechVB
this is so cool
i have a question tough, Can you make the bar transparent but not the icons to

Re: Application Bar update - Clearer Icons

Posted: Sat Jul 10, 2010 6:05 pm
by zachman61
nice