-
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
-
Are you sure you used the ScaleX / ScaleY properties correctly, I know they work..
Code:
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]
-
detail
I'm using an stdPicture object. It has limeted properties and documetation.....
-
Answer found
Code:
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