resize form bg image

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
 
E

Ed Kaim [MSFT]

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.
 
T

tom

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.





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top