Article View: comp.lang.basic.misc
Article #173Re: Twips and Pixels?
From: Mike Williams
Date: Tue, 03 Aug 1999 00:00
Date: Tue, 03 Aug 1999 00:00
41 lines
2757 bytes
2757 bytes
A point is unit of measure used hundreds of years ago when the printing industry was just developing. There are 72 points to the inch. When printing became more accurate there was a need for a better unit of measure, and so they started using "twentieths of a point" (Twips). There ar 20 Twips in a Point, so that the number of Twips per inch is 1440. (Here endeth the history lesson - which I have just made up, actually, but it all sounds very plausible!). Now all you need to know now is how many Twips there are in a Pixel. This depends on the resolution which your application is running in (640 x 480), (800 x 600) etc (or your Printer's resolution, if it is for some Printer stuff). For a monitor, this is always the same in both directions (horizontal and vertical), but for a printer they can be different. You can find this out easily: Dim tppx as Single, tppy as Single tppx = Screen.TwipsPerPixelX ' (or Printer.TwipsPerPixelX) tppy = Screen.TwipsPerPixelY ' (or Printer.TwipsPerPixelY) The Picture box will use its container's ScaleMode (that of the Form) when you set its Left, Top, Wifth or Height properties. So, if you want to use pixels for this then set Form ScaleMode to vbPixels. Measurements within the Picture Box (for positioning graphics, text etc) depend on its own ScaleMode property, so if you want you can set Picture1.Scalemode = vbPixels. Mike Pierre Fenkart <Falke2@gmx.de> wrote in message news:7o4m83$cln$1@pollux.ip-plus.net... > > Pierre Fenkart <Falke2@gmx.de> schrieb in im Newsbeitrag: ... > > Hi! > > > > I want to know, how I can recalculate Twips in Pixels? Is it to say a > > Project instead of Picture1.Left = 2000 (Twips) this in Pixels? > > > > Pierre > > > > > > > > > >
Technical Details
Message-ID:
<7o5alp$5m2$3@news8.svr.pol.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7o4m83$cln$1@pollux.ip-plus.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c949,9f64214068f82bcc X-Google-Attributes: gid10c949,public X-Google-Thread: 112458,9f64214068f82bcc X-Google-Attributes: gid112458,public X-Google-Thread: f645d,9f64214068f82bcc X-Google-Attributes: gidf645d,public X-Google-Thread: 110e3b,9f64214068f82bcc X-Google-Attributes: gid110e3b,public From: "Mike Williams" <mike@chapelmews.freeserve.co.uk> Subject: Re: Twips and Pixels? Date: 1999/08/03 Message-ID: <7o5alp$5m2$3@news8.svr.pol.co.uk> X-Deja-AN: 508149153 References: <7o4m83$cln$1@pollux.ip-plus.net> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 X-Complaints-To: abuse@theplanet.net X-Trace: news8.svr.pol.co.uk 933637625 5826 62.136.32.6 (2 Aug 1999 23:47:05 GMT) Organization: Customer of Planet Online X-MSMail-Priority: Normal NNTP-Posting-Date: 2 Aug 1999 23:47:05 GMT Newsgroups: comp.lang.basic.misc,comp.lang.basic.visual,comp.lang.basic.visual.misc,fido.ger.basic