Results 1 to 9 of 9
  1. #1
    snorkyller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    16

    Question Position of controls in centimeters, not pixels ?!

    The position of the controls on the form (Top and Left properties) are set in centimeters.

    But I'd need to set it in pixels because screen resolution are in pixels.

    How would I do that? How to know how much centimeters from the left is located the middle of the screen?

    Thank you.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by snorkyller View Post
    The position of the controls on the form (Top and Left properties) are set in centimeters.
    actually, no I don't think they are. where are you looking? the prop sheet?

    the common measurement in access is called a TWIP, which is mostly used in visual basic coding for the program.

    Quote Originally Posted by snorkyller View Post
    How to know how much centimeters from the left is located the middle of the screen?
    you should find another way to figure this out. Just from this post, it seems as though you may be a novice with Access? To actually figure something like this out, you would need some serious API coding, which shouldn't really be needed in any application anyway.

    Isn't there another way you can do what you want to do?

  3. #3
    snorkyller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    16
    Yes they are in centimeters (or in inches, according to your computer settings). I'm talking about the design mode (see the images below). Ex: If you want to set the position of a button in the properties windows, the values are in centimeters. The rulers at the top and at the left are also in centimeters.

    Design mode


    Properties window (left of above image)

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    actually I don't think that matters. have you got 2 machines with different screen res's to test with? or use the same one, just change it.

    I don't think there's any automation available to center a control like that. I'm inclined to think though, that it wouldn't matter. try and see.

  5. #5
    snorkyller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    16
    Let me reformulate and precise my problem:

    I'm working on a 1366x768 screen. The database will run on a 1280x1024 screen. The forms and the controls will have to fix exactly with this screen. But it's in an another building so I can't test it right now. So when I position my controls, I don't have any idea where they would be on a 1280x1024 screen. Some controls must be just near the edge but I may position them incorrectly over the edge in fact. So I'm wondering:

    - Is it possible to change the access setting so the properties will be displayed in pixels and not in centimeters?
    - If not, how to know how much centimeters are 1280x1024?

    Thank you

  6. #6
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by snorkyller View Post
    - Is it possible to change the access setting so the properties will be displayed in pixels and not in centimeters?
    NO.

    [/QUOTE]

    as far as ''over the edge'' with regard to controls, that makes no sense, sir. controls can never be over the edge of a form border.

    as of now, there's no other advice I have.

  7. #7
    snorkyller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    16
    Quote Originally Posted by ajetrumpet View Post
    that makes no sense, sir. controls can never be over the edge of a form border.
    I was talking about the screen, not the form! If a form is bigger than the screen resolution, than the controls can be over the edge of the screen so that you can't see them...

    Isn't my question simple? Thank you anyway...

    In Visual Basic (visual studio), all the values are in pixels, so I'm a little confused to work with centimeters and inches.

  8. #8
    snorkyller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    16
    I found the solution. Here's for the benefit of everyone:

    You have to know the dpi setting of your screen (pixels/inches)
    If your screen has 96 dpi and a resolution of 1024x768, than your screen has 10.7x8 inches (1024/96=10.7 and 768/96=8).

    Then, you know that if the Left property of your controls is smaller than 10 inches, they are within the screen limits. If it's more than 10, you will not see them.
    Using that method, the position of your controls can be very accurate.

    Thanks to me

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for posting back with *your* solution! I marked this thread as Solved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Set Form Position
    By Yance in forum Programming
    Replies: 3
    Last Post: 11-29-2010, 02:20 PM
  2. Show Mouse Position
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-31-2010, 04:37 AM
  3. Append Query position
    By t_dot in forum Queries
    Replies: 7
    Last Post: 08-11-2010, 11:17 AM
  4. position multiple subforms
    By Mclaren in forum Programming
    Replies: 1
    Last Post: 07-12-2010, 08:52 AM
  5. Replies: 7
    Last Post: 04-27-2010, 10:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums