Click to See Complete Forum and Search --> : ScaleMode
JEN001
Dec 4th, 2000, 06:35 PM
stdPicture Height and Widht properties are in HiMetrics. Does any one know the HiMetric to pixel Ratio or Of a Valid Conversion routine or API for HiMetric to Pixels. I tried ScaleX and ScaleY they returned a negative number which is not possible when I know the image file I'm testing with is 24x22 pixels.
Any ideas would be great.
thanks
YoungBuck
Dec 4th, 2000, 07:25 PM
Are you sure you used the ScaleX / ScaleY properties correctly, I know they work..
Dim PixWidth As Integer, PixHeight As Integer
PixWidth = Me.ScaleX(Picture1.Picture.Width, vbHimetric, vbPixels)
PixHeight = Me.ScaleY(Picture1.Picture.Height, vbHimetric, vbPixels)
And just in case you can't get those functions to work the formula would be...
Pixels = Himetrics / 26.45454545455
[Edited by YoungBuck on 12-04-2000 at 08:29 PM]
JEN001
Dec 5th, 2000, 08:18 AM
I'm using an stdPicture object. It has limeted properties and documetation.....
JEN001
Dec 5th, 2000, 08:24 AM
Dim lScaleX as Long, lScaleY as Long
Dim stdPic As stdPicture
lScaleX = CLng(ScaleX(stdPic.Width, _
vbHiMetric, vbPixels))
lScaleY = CLng(ScaleY(stdPic.Height, _
vbHiMetric,vbPixels))
That solves the problem.
Thanks
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.