Application Bar Update - Folders/Harddrives
Posted: Wed Aug 05, 2009 4:08 am
Hello,
A tiny update for the Application Bar now. This one will give you the ability to add folders and harddrives to your bar where as the previous versions had problems doing this.
You need to first add 2 embedded files to the project which will be *.ico files named the following:
1. Folder.ico
2. Harddrive.ico
You can choose your own icon images to match your windows theme or you can use these ones. .. ..right-click and save image to your harddrive they wont look grainy I promise.
Once you have added those to the project you need to find the code below and change it as listed:
Find:
Need any help please ask.
A tiny update for the Application Bar now. This one will give you the ability to add folders and harddrives to your bar where as the previous versions had problems doing this.
You need to first add 2 embedded files to the project which will be *.ico files named the following:
1. Folder.ico
2. Harddrive.ico
You can choose your own icon images to match your windows theme or you can use these ones. .. ..right-click and save image to your harddrive they wont look grainy I promise.
Once you have added those to the project you need to find the code below and change it as listed:
Find:
Code: Select all
Change it to this: Catch ex As Exception
Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(line)
Dim s = ico.ToBitmap
w.Image = s
End Using
End Try
Code: Select all
Find:Catch ex As Exception
Try
Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(line)
Dim s = ico.ToBitmap
w.Image = s
End Using
Catch wex As Exception
If line.Length = 3 Then
Using ico As Icon = My.Resources.Harddrive
Dim s = ico.ToBitmap
w.Image = s
End Using
Else
Using ico As Icon = My.Resources.Folder
Dim s = ico.ToBitmap
w.Image = s
End Using
End If
End Try
End Try
Code: Select all
Change to this: Catch ex As Exception
Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(filename)
Dim s = ico.ToBitmap
w.Image = s
End Using
End Try
Code: Select all
Thats it all done. You should now be able add folders and harddrives to the bar without problems.Catch ex As Exception
Try
Using ico As Icon = Drawing.Icon.ExtractAssociatedIcon(filename)
Dim s = ico.ToBitmap
w.Image = s
End Using
Catch wex As Exception
If filename.Length = 4 Then
Using ico As Icon = My.Resources.Harddrive
Dim s = ico.ToBitmap
w.Image = s
End Using
End If
Using ico As Icon = My.Resources.Folder
Dim s = ico.ToBitmap
w.Image = s
End Using
End Try
End Try
Need any help please ask.