Guest MrPolite Posted October 7, 2002 Posted October 7, 2002 I want to see how many pixels is a centimeter/inch on my monitor, how can I do this? I dont want to use the compatibility class. Quote
Guest OnErr0r Posted October 7, 2002 Posted October 7, 2002 1440 twips per inch. 2.54 cm per inch. Quote
Guest MrPolite Posted October 7, 2002 Posted October 7, 2002 1440 twips per inch. 2.54 cm per inch. well and how do I find that out at runtime? let's say I'm running my app on two comps with two different screen resolutions. I need to know how many pixels each inch is on each monitor. Dunno about twips, I dont think that would work:confused: Quote
Guest OnErr0r Posted October 8, 2002 Posted October 8, 2002 Its a constant, design or runtime makes no difference. Look at ScaleX/Y properties in the help. Twip (1440 twips per logical inch; 567 twips per logical centimeter). Quote
Guest OnErr0r Posted October 8, 2002 Posted October 8, 2002 Pixels will vary with the screen resolution. Use Screen.TwipsPerPixelX/Y to calculate them. Your original question asked how many twips per inch/centimeter. Quote
*Gurus* divil Posted October 8, 2002 *Gurus* Posted October 8, 2002 (edited) There is no Screen object in VB.NET. There is no real way of getting an accurate pixels per inch measurement, I suppose one way would be to ask the user what size monitor they're using. [edit] Ok, there is a Screen object but it doesn't do what you want. [/edit] Edited October 8, 2002 by divil Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest OnErr0r Posted October 8, 2002 Posted October 8, 2002 oops, didn't notice it was the .net board. I hate it when they alter the original question too :/ Quote
Guest MrPolite Posted October 9, 2002 Posted October 9, 2002 oops, didn't notice it was the .net board. I hate it when they alter the original question too :/ :) and there HAS to be a way to do this in .NET. It would be ridiculus otherwise. There is a DpiX and DpiY property, but I couldnt make it to work any ideas?:confused: Quote
*Gurus* divil Posted October 11, 2002 *Gurus* Posted October 11, 2002 Don't bother bumping, it only irritates people. Your best bet might be what I already said, there isn't a way of getting a true measurement of pixels/inch from a screen unless you know the size of the screen. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.