|
-
Dec 4th, 2000, 07:35 PM
#1
Thread Starter
Junior Member
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
Code:
If at work Then GoTo UseDifName
-
Dec 4th, 2000, 08:25 PM
#2
Fanatic Member
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]
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Dec 5th, 2000, 09:18 AM
#3
Thread Starter
Junior Member
detail
I'm using an stdPicture object. It has limeted properties and documetation.....
Code:
If at work Then GoTo UseDifName
-
Dec 5th, 2000, 09:24 AM
#4
Thread Starter
Junior Member
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
Code:
If at work Then GoTo UseDifName
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|