473,473 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 5882

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: tzellman | last post by:
Before I ask for help, let me give you my situation, including what I HAVE been able to do. I am trying to show an image (large, say the whole screen), and allow for instantaneous visual results...
22
by: Kim Scarborough | last post by:
Say I wanted to put a couple lines of asterisks between paragraphs, and have it stretch the spaces so that it spanned 100% of the text-width, like this: * * * * * ...
3
by: Raed Sawalha | last post by:
I read in MSDN an examples for Image Stretching but something I can not understand is this line e.Graphics.DrawImage(newImage, destRect1, x, y, width, height, units); what is e in all example they...
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
4
by: Arthur Dent | last post by:
Hello all... i have a really frsutrating problem here... This is only happening in IE (6 & 7b2), Mozilla and Netscape are both OK. I have a top-level table with a width of 760px, so it should be...
14
by: rsearing | last post by:
I am new to HTML and will have to beg if this is obvious, but I am trying to design a table that looks like: ******************************** *----A------*------------------------*...
2
by: elephant | last post by:
I'm trying something in CSS, and I was wondering if anyone knows of a way to do it. The goal is to have one image with a width of 25px, and have the left 12 pixels be one side of an image of...
0
by: SayamiSuchi | last post by:
hi I have taken one image control("image1") in the form("frmForm1.aspx").Now i want to one image ("mypic.jpeg") whose size is larger than the image control i.e image1.When i run the program, the...
2
by: mahesh123 | last post by:
Hi Folks, I Want regarding the stretching image on the MDI Form? I have one MDI Form and there is a image on that form? so that i want to stretch the image on the form according to the screen...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.