Hi,
Does anyone know how I can add an icon on top of another icon say in a grid ?
Thanks
Printable View
Hi,
Does anyone know how I can add an icon on top of another icon say in a grid ?
Thanks
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()
PeteD ,
Use " / " not " \ " with vbcode tags (of course without quotes) .
oops :D cheers, have ammended it.Quote:
Originally posted by Pirate
PeteD ,
Use " / " not " \ " with vbcode tags (of course without quotes) .
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.Quote:
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