|
-
Jul 24th, 2003, 09:50 AM
#1
Thread Starter
New Member
Adding Icons on top of Icons
Hi,
Does anyone know how I can add an icon on top of another icon say in a grid ?
Thanks
-
Jul 24th, 2003, 11:51 AM
#2
Addicted Member
something like this:
VB Code:
Dim BaseImage As Bitmap = Image.FromFile("C:\Image1.bmp")
Dim OverlayImage As Bitmap = Image.FromFile("C:\Image2.bmp")
Dim g As Graphics = Graphics.FromImage(BaseImage)
OverlayImage.MakeTransparent(Color.White)
g.DrawImage(OverlayImage, 0, 0)
g.Dispose()
Last edited by PeteD; Jul 24th, 2003 at 12:25 PM.
-
Jul 24th, 2003, 12:05 PM
#3
Sleep mode
PeteD ,
Use " / " not " \ " with vbcode tags (of course without quotes) .
-
Jul 24th, 2003, 12:26 PM
#4
Addicted Member
Originally posted by Pirate
PeteD ,
Use " / " not " \ " with vbcode tags (of course without quotes) .
oops cheers, have ammended it.
-
Jul 25th, 2003, 08:44 AM
#5
Thread Starter
New Member
Thanks for your help so far.
I have tried this but keep getting a system exception error as :
"A Graphics object cannot be created from an image that has an indexed pixel format."
I have tried converting the type to an image but with no luck.
In the example your icons are .bmp files where as mine are .gif files. This may have something to do with it.
Any more ideas ?
Thanks
-
Jul 25th, 2003, 08:46 AM
#6
Addicted Member
Originally posted by Ben1206
Thanks for your help so far.
I have tried this but keep getting a system exception error as :
"A Graphics object cannot be created from an image that has an indexed pixel format."
I have tried converting the type to an image but with no luck.
In the example your icons are .bmp files where as mine are .gif files. This may have something to do with it.
Any more ideas ?
Thanks
Not sure about gif's sorry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|