471,066 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Stretching an image

How would I stretch an image in a C# application to span the full width of
the screen?

Basically I've got a header logo and then a spacer image that I want to use
to fill the width of the screen.

Also does anyone know how to resize the background image instead of having
it tiled in a window??

Thanks,
Doug
Nov 16 '05 #1
1 5802

"Dougie" <do****@nospam.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl...
How would I stretch an image in a C# application to span the full width of
the screen?

Basically I've got a header logo and then a spacer image that I want to use to fill the width of the screen.

Also does anyone know how to resize the background image instead of having
it tiled in a window??

Thanks,
Doug


You can just figure out the size of the rectangle you want to fill, and draw
the image like this
grfx.DrawImage(img, rect);

Or do you need to know how to figure the rectangle?

Eric
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by tzellman | last post: by
22 posts views Thread by Kim Scarborough | last post: by
3 posts views Thread by Raed Sawalha | last post: by
4 posts views Thread by Arthur Dent | last post: by
2 posts views Thread by elephant | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.