By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

resize form bg image

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.
"tom" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
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

Jul 21 '05 #2

P: n/a
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 acopy and not just resize the background image because you'll lose qualitythe more the image is sized up and down.
"tom" <an*******@discussions.microsoft.com> wrote in messagenews:05****************************@phx.gbl...
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

.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.