Solved

Graphics.DrawImage Assistance

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
scanning dentists xray (the small ones) 3 53
VB.net Move a class from Solution Items to a project 2 22
Help with error when uploading excel file 3 26
write xml in vb.net 2 24
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
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 …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

19 Experts available now in Live!

Get 1:1 Help Now