Overlay bitmap on icon

C

Carl Gilbert

Hi

I have to following code which sets up a new bitmap.

'set up a transparent 16x16 bitmap
Dim bm As New Bitmap(16, 16)
Dim g As Graphics = Graphics.FromImage(bm)
g.Clear(System.Drawing.Color.Transparent)

'draw a rectangle on the transparent bitmap
Dim pn As Pen = New Pen(System.Drawing.Color.Blue)
g.DrawRectangle(pn, 0, 13, 16, 4)

'get the icon image to be modified
Dim tmpImg As Image = Me.imgsmImageList.Images(0)

Firstly does anyone know how to overlay this bitmap on the current icon
being used?
And secondly, how to draw a solid rectangle at the bottom of the bitmap.
I have managed to draw an outline, but I think this may be wrongly
positioned anyway.

Ultimately, I am trying to build a transparent bitmap (16x16), draw a
coloured rectangle (4 high x16 wide) at the bottom of the bitmap and finally
overlay this bitmap on an icon in the menu.

Any help on this would be greatly appreciated.

Regards, Car Gilbert
 
C

Carl Gilbert

This site looks good but it's rather large. But can anyone suggest what to
look for?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top