PDA

Click to See Complete Forum and Search --> : How to fix Image Background


White Rose
Feb 1st, 2003, 11:57 AM
I set a picture to be the form's background but it's filled full on form.

How can i do to show only that image?

Jeremy Martin
Feb 1st, 2003, 12:21 PM
You can use the gdi+ to draw the image on the from where you want it. Lookup the DrawImage method.

Jeremy

Jeremy Martin
Feb 1st, 2003, 12:37 PM
Try this.

Bitmap b = new Bitmap("C:/myfile.bmp");

Graphics g = this.CreateGraphics();
g.DrawImage(b, new Rectangle(0, 0, b.Width, b.Height), 0, 0, b.Width, b.Height, GraphicsUnit.Pixel);