Units and coding - pixels or centimetres?

elsandalos

Registered User.
Local time
Today, 11:57
Joined
Jan 27, 2004
Messages
22
Hi all,
I'm currently coding a form field to change height depending on a variable. I've noticed that while viewing an object's properties in design mode, the height is displayed in cm, but when you code it in vb you have to give the value in pixels.

Is there a way of changing the default Access units to pixels? it would make things easier. Or do i need to code a little cm > pixels converter so that i can look at the layout i want in design mode, and carry the same values through into vb?

cheers
El.
 
The basic measurement is twips !! If you look up twips in VB help ..... nothing. After searching height the following came up:

The following code resizes a command button to a 1-inch by 1-inch square button (the default unit of measurement in Visual Basic is twips; 1440 twips equals one inch):

Me!cmdSizeButton.Height = 1440 ' 1440 twips = 1 inch.
Me!cmdSizeButton.Width = 1440

HTH Dave
 

Users who are viewing this thread

Back
Top Bottom