Solved

Graphics.DrawImage Assistance

Posted on 2008-10-09
2
204 Views
Last Modified: 2012-05-05
How can I use Graphics.DrawImage so that the image I draw appears at it's original size ?

(Like AutoSize on a picturebox)
0
Comment
Question by:OhNowISee
2 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 125 total points
ID: 22676435
Use something like this....

        Dim img As Image = Image.FromFile("C:\Path\Image.jpg")
        Graphics.DrawImage(image:=img, x:=0, y:=0, width:=img.Width, height:=img.Height)

The image need not be loaded from a file, but must be an Image or BitMap object.

Wayne
0
 

Author Closing Comment

by:OhNowISee
ID: 31504571
How incredibly obvious...
How incredibly stupid of me !!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question