Results 1 to 4 of 4

Thread: ScaleMode

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25

    Angry

    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

  2. #2
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    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}

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25

    Lightbulb detail

    I'm using an stdPicture object. It has limeted properties and documetation.....
    Code:
    If at work Then GoTo UseDifName

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25

    Cool 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
  •  



Click Here to Expand Forum to Full Width