Application Bar Update - Folders/Harddrives
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
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:
all done. You should now be able add folders and harddrives to the bar without problems.
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.
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 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.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Well if you keep like this you'll turn it in an application better then RocketDock 

hello, I do not work , I get error:
My.Resources.Harddrive
My.Resources.Folder
" System.Drawing.Bitmap a value of type can not be converted into system.drawing.icon "
My.Resources.Harddrive
My.Resources.Folder
" System.Drawing.Bitmap a value of type can not be converted into system.drawing.icon "
Fede1591 wrote:hello, I do not work , I get error:Did you use the images from this tutorial or your own?
My.Resources.Harddrive
My.Resources.Folder
" System.Drawing.Bitmap a value of type can not be converted into system.drawing.icon "
Make sure they are .ico type files and not bitmaps or jpgs etc.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
hello, and tested and follow me out the error:
" System.Drawing.Bitmap a value of type can not be converted into system.drawing.icon "
You could upload the file ?
thank you
" System.Drawing.Bitmap a value of type can not be converted into system.drawing.icon "
You could upload the file ?
thank you
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Copyright Information
Copyright © Codenstuff.com 2020 - 2023