![]() | |
#11
| |||
| |||
|
|
The result will be in Twips. If you need it in Pixels, multiply by 15. I think you meant divide by 15. |
#12
| |||
| |||
|
|
Anyway, using these functions returns 15 for the twipsperpixel value, for both x and y. So twips/15=pixels. But I don't think 15 would work in all cases, with all resolutions. Neil |

#13
| |||
| |||
|
|
"Stuart McCall" <smccall (AT) myunrealbox (DOT) com> wrote in message news:fiiaea$sas$1$8300dec7 (AT) news (DOT) demon.co.uk... I'm curious (and there's no cure for curiosity). What do you need the info for? I'm opening up multiple instances of the same form. I want to place the second instance just a little down from the first, so the top left corner of the window sits right at the top left of the form in the previous window, and so on. |
#14
| |||
| |||
|
|
"Neil" <nospam (AT) nospam (DOT) net> wrote in message news:Pd23j.3311$fl7.883 (AT) newssvr22 (DOT) news.prodigy.net... "Stuart McCall" <smccall (AT) myunrealbox (DOT) com> wrote in message news:fiiaea$sas$1$8300dec7 (AT) news (DOT) demon.co.uk... I'm curious (and there's no cure for curiosity). What do you need the info for? I'm opening up multiple instances of the same form. I want to place the second instance just a little down from the first, so the top left corner of the window sits right at the top left of the form in the previous window, and so on. If your form instances are the only visible objects, then you ought to be able to use this: DoCmd.RunCommand acCmdWindowCascade Thanks for the tip, but, no, they're just pop-ups on top of a main form. |
#15
| |||
| |||
|
|
Anyway, using these functions returns 15 for the twipsperpixel value, for both x and y. So twips/15=pixels. But I don't think 15 would work in all cases, with all resolutions. Neil Yes it would. That's precisely _why_ the twip was 'invented'. It's a device-independent measurement unit. (And yes I did mean divide. Duh! ![]() Well, with all due respect, I believe you're wrong here. The twip isn't a |
#16
| |||
| |||
|
|
Well, with all due respect, I believe you're wrong here. The twip isn't a device-independent measurement unit. It may be regionally-independent (i.e., isn't inches or centimeters), but it's not device-independent. "twip" = "twentieth of a point" (should probably have been spelled "twep" -- but that just sounds *wrong* :-) ). A point is defined as 1/72 of an inch. Thus, a twip is a fixed value: 1/1440 of an inch. The number of pixels per inch, on the other hand, depends on your monitor. Thus, since twips are fixed to inches, and pixels per inch varies, twips per pixel will also vary. Granted, pixels per inch will not vary much (which is why you could get away with using a set number, like 15). But, as monitor technology changes, the number of pixels per inch may increase, and, hence, the number of pixels per twip may increase. Or, if that were not the case, why would all of these code samples use API calls to convert twips to pixels? They could just divide by 15 and be done with it, right? :-) Neil |
#17
| |||
| |||
|
|
Well, with all due respect, I believe you're wrong here. |
#18
| |||
| |||
|
|
"Neil" <nospam (AT) nospam (DOT) net> wrote in message news:iub3j.3341$fl7.2809 (AT) newssvr22 (DOT) news.prodigy.net... Well, with all due respect, I believe you're wrong here. The twip isn't a device-independent measurement unit. It may be regionally-independent (i.e., isn't inches or centimeters), but it's not device-independent. "twip" = "twentieth of a point" (should probably have been spelled "twep" -- but that just sounds *wrong* :-) ). A point is defined as 1/72 of an inch. Thus, a twip is a fixed value: 1/1440 of an inch. The number of pixels per inch, on the other hand, depends on your monitor. Thus, since twips are fixed to inches, and pixels per inch varies, twips per pixel will also vary. Granted, pixels per inch will not vary much (which is why you could get away with using a set number, like 15). But, as monitor technology changes, the number of pixels per inch may increase, and, hence, the number of pixels per twip may increase. Or, if that were not the case, why would all of these code samples use API calls to convert twips to pixels? They could just divide by 15 and be done with it, right? :-) Neil That's at odds (I think) with what I read here: "In VB 6 and earlier, all form measurements defaulted to a measurement called the twip. A twip (twentieth of a point) is really a measure more useful in traditional printing because it represents absolute distance. A twip is 1/1440th of an inch or 1/567th of a centimeter. That is, there are 1440 twips to an inch or 567 twips to a centimeter. If you're saying, "Huh?" in confusion, you're not the first. This archaic measurement has been giving VB programmers fits for years. (In fairness to Microsoft, some of their justification is that the twip is a device-independent unit of measurement and in VB 6, two properties of the Screen object, TwipsPerPixelX and TwipsPerPixelY, can be used to determine the size of the display at run time. Using these properties, it's possible to write code to make your forms more device independent.)" I can't remember where that came from; I got it ages ago (could have been from the vb.net site [as was]) Maybe I've interpreted it incorrectly. Not sure now. |
![]() |
| Thread Tools | |
| Display Modes | |
| |