resize form bg image

  • Thread starter Thread starter tom
  • Start date Start date
T

tom

Hello,

does anyone know if and how it is possible that
when you use an image as backgroundimage of a form,
this image adjusts itself when the form resizes. Sth.
like 'StretchImage' for a picturebox.

thanx,
t
 
Handle the Resize event of the form with code like:

this.BackgroundImage = new Bitmap(this.bitmapBacking, this.Size);



Where bitmapBacking is the original background bitmap. It's better to have a
copy and not just resize the background image because you'll lose quality
the more the image is sized up and down.
 
thanx,

easy and effective!

t

-----Original Message-----
Handle the Resize event of the form with code like:

this.BackgroundImage = new Bitmap(this.bitmapBacking, this.Size);



Where bitmapBacking is the original background bitmap. It's better to have a
copy and not just resize the background image because you'll lose quality
the more the image is sized up and down.





.
 
Back
Top