Hello, basically I want to have two TImage components, one I will use and using the Bitmap tools in Delphi I will create a background. In the second TImage I will create objects which move around the custom background but I still want the first TImage to be visible.

The problem I have is when I create the second TImage ontop of the first one the Canvas creates a huge white square over the background image making it impossible to see, how can I make the second TImage transparent so that the background is always visible and does not change regardless of the movements in the second one.

Recommended Answers

All 3 Replies

Thanks! I've seen AlphaBlend before and never managed to get it to work. This procedure sure looks like it will though, you are great at finding these :D.

Just a question though, I have no idea how to call it, I.e. how can I use this procedure to turn a TImage into (for example Image1) Bitmap and then make it transparent and then draw over it using canvas tools such as MoveTo and LineTo

Graphics is not my strong suit, I usually have someone doing that for me ;)

What I would probably do is put the background Image on a form, put a graphic control over it to draw on (if that is what you mean).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.