PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Setting background issue for drawing application in .NETCF

Hi all,

I am developing painting software for pocket pc using .NETCF. I like to set background for that painting application. I declared one global bitmap variable like this
Bitmap bm = new Bitmap
All images are painted in this bitmap (bm) as shown below.
Graphics.FromImage (bm).DrawLine (new Pen (pnlColor.BackColor), lastPos.X, lastPos.Y, e.X, e.Y);
Now I like to set background for this painted image. I used the following code.
Graphics.FromImage (bm).DrawImage (bmpBackground, 0, 0);

The above code just draws the background image over my painted image. So my painted image is hidden and it shows only the background image. But I like to set the background for my painted image. How to tackle this situation. Thanks in advance.

Regards,

S.Sevugan.
<a href="http://msdn.microsoft.com/smartclient/understanding/netcf/FAQ/default.aspx#2.4">here</a> (you want to plot the background then plot whatever your drew onto it using a transparency key)
Sevugan · 08 Oct 2005, 13:45 UTC — Thanks
Hi,

Thanks for your reply.I am not getting you.Can you please explain me clearly.I gone through that .NETCF FAQ also.I am not understand that clearly.Can you please explain once again.

Regards,
:D S.Sevugan.
2.4. How do I draw an image with transparency?
You want that section.

Like I said before, do this:

plot the background
plot your image on top of it using a transparency keys on the areas you want the background to show through on

That's the only way you'll get your background under your image.