Results 1 to 2 of 2

Thread: Coordinates of the control

  1. #1

    Thread Starter
    Hyperactive Member abhid's Avatar
    Join Date
    Nov 2001
    Location
    3rd rock from the sun
    Posts
    467

    Coordinates of the control

    Hi everybody
    I always find it difficult converting the coordinates of controls on
    the form due to various scalemode like Twips, pixels.

    Is there any standard method to convert the .Left, .Top ,.Width
    properties to X and Y coordinates which can be used in functions
    like SetPixel, CreateRectRgn (Especially function for Regions)
    Please help me.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    VB Code:
    1. X = Control.Left / Screen.TwipsPerPixelsX
    2. Y = Control.Top / Screen.TwipsPerPixelsY

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