Solved

Graphics.DrawImage Assistance

Posted on 2008-10-09
2
197 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Calling web service and its methods dynamically 2 42
Multiple file Upload asp.net 2 40
Round up to 100% in .NET 10 87
Run a batch file when a Crystal Report is opened 5 15
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now