Here is a previous post of mine on this subject. If you did a search on
GoogleGroups you would find a lot more detail on this subject from earlier
posts of mine. Specifically, I have seen instances when the ImageWidth and
ImageHeight props do not return the correct values, thus error/boundary
checking is required.
If you are working with an Image that was not scanned/created and not
designed to be displayed at a specific resolution then you can simply:
1) Load the Image into your Image control
2) Set the Image control's Width to its ImageWidth property
3) Set the Image control's Height to its ImageHeight property
' Modify code to reference your Image control's Name
Me.NameOfYourImageControl.Picture = "C\NameOfAPic.jpg"
Me.NameOfYourImageControl.Width = Me.NameOfYourImageControl.ImageWidth
Me.NameOfYourImageControl.Height = Me.NameOfYourImageControl.ImageHeight
Message 4 in thread
From: Stephen Lebans (StephenLeb...@mvps.org)
Subject: Re: letters & signatures
View this article only
Newsgroups: comp.databases.ms-access
Date: 2002-06-11 19:45:15 PST
Once you load the Image into the Image control you can access the
control's ImageHeight and ImageWIdth properties to ascertain the size of
the Image. The issue here though is you really need to know at what
resolution the signatures were originally scanned at. I'll give you an
example:
1) Scanned at 300DPI
2) Saved as a Bitmap 600w x 300h
3) Load into Image control. Read ImageWidth and Height props.
4) 600/300 = 2 inches wide - 300/300 = 1 inch tall
5) ImageControl.Width = 1440 * 2
6) ImageControl.Height = 1440 * 1
7) ImageControl.SizeMode = acOLESizeZoom
8) Position the Image control as required.
1440 = Twips per Inch
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian" <br*************@aol.com> wrote in message
news:11*********************@j73g2000cwa.googlegro ups.com...
Using A2K I have an image control on a report and use code to set the
image.picture to the required jpg. 3 of the jpgs resize properly but
2 do not - they display much smaller than the image control. The
problem jpgs were originally created as line drawings in Word. They
were then copy and pasted to Paint where they were saved as jpg files.
Sizemode is set to stretch.(have tried clip and zoom but no better). I
cannot find any way to make them expand to the size of the image
control.