473,943 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stretching Images

I read in MSDN an examples for Image Stretching but something I can not
understand is this line
e.Graphics.Draw Image(newImage, destRect1, x, y, width, height, units);
what is e in all example they did not show what is e ????? any help
Nov 17 '05 #1
3 2939
That e is PaintEventArgs instance.

It is used in methods for event handlers

this.Paint += new PaintEventHandl er(this.form1_p aint);

private void form1_paint(obj ect sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
}

or when overriden from Control
protected override void OnPaint(PaintEv entArgs e)
{
//...
}

Paint event handler is generated automatically for you when you double click
on your form in form designer.

"Raed Sawalha" <Ra*********@di scussions.micro soft.com> wrote in message
news:41******** *************** ***********@mic rosoft.com...
I read in MSDN an examples for Image Stretching but something I can not
understand is this line
e.Graphics.Draw Image(newImage, destRect1, x, y, width, height, units);
what is e in all example they did not show what is e ????? any help

Nov 17 '05 #2
> Paint event handler is generated automatically for you when you double
click
on your form in form designer.


correction: Load event handler is generated by double clicking form, not
paint handler, double click the row in property grid's event table to handle
paint event (as for every other event)
Nov 17 '05 #3
See the GDI+ FAQ and the Beginners Guide to GDI+ for details.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Raed Sawalha" <Ra*********@di scussions.micro soft.com> wrote in message
news:41******** *************** ***********@mic rosoft.com...
I read in MSDN an examples for Image Stretching but something I can not
understand is this line
e.Graphics.Draw Image(newImage, destRect1, x, y, width, height, units);
what is e in all example they did not show what is e ????? any help

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1978
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 with regards to a lookup table change. In essence, I am going for an interactive contrast stretch. I have been able to do this, but only for one band of a 3 band image. Thus, I have been able to create a byte array of pixels, and by changing the...
10
3255
by: Michael | last post by:
How can I identify the Table that the Geocities banner is in? I tried document.all.tags("table").style.display = 'none' no matter what number I used nothing worked. Using CSS script TABLE {display:none}
22
4094
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: * * * * * * * * Is there a way to do this in CSS? I don't want it to line break, just collapse the spacing between the stars if the window gets narrower. -- ----------------------------------------------------------------------------
3
9403
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" bgColor="#000000"><IMG src="../Images/image1"> </td> </tr> <TR>
4
1797
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 760 minimum and stretching wider as needed to fit content (such as bound datagrids). In the top TR/TD, i have a header table which is width of 100%, and has three TD's. Each contains one image file, with the middle TD being set to width 100%. So...
2
3735
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 indeterminate width, the right 12 pixels be the right side of the image, and the center pixel to stretch the entire distance in between. I know how to do this using three separate images, but is it possible to do it by just somehow stretching the 1...
4
5973
by: camphor | last post by:
hi, I have a single column webpage with a rounded corner box which is positioned on the left in which the links sit, the main content is on the right, I am trying to make the page stretch with the content but only the main content side works, not quite sure what I am doing wrong CSS body { background-color: #e2dfc2; margin-left: 0px; margin-top: 0px;
3
2049
by: guaranine | last post by:
Hi, I've got the 100% height for the whole table working. What is really confusing me is how to make the TR tag in which the content is work properly in IE. If I do not explicitly specify its height, there is a gap between the header and the content with background images continuing from the header. Here's how it looks: http://graphics.filefest.net/mie350/index.php?page=swimming However, if I do set the height of the content TR to be...
5
1330
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I m stretching my form and i want if i stretch its position after stretching must be in middle of screen or i want to stretch centerly. Thanx >> ALI <<
0
10135
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11532
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11298
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7390
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6087
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6308
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4910
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4510
muto222
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.