Setting background issue for drawing application in .NETCF

Oct 8 2005 3:18 AM

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.