Solved

Graphics.DrawImage Assistance

Posted on 2008-10-09
2
195 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
Comment Utility
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
Comment Utility
How incredibly obvious...
How incredibly stupid of me !!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

9 Experts available now in Live!

Get 1:1 Help Now