From: NadCixelsyd on 29 Apr 2010 20:51 I need a form that is 80 characters wide. At 120 twips per character, that's 9600 twips wide. But the border on my XP system is 4 pixels (60 twips) on each side, so I add 120 twips and set my form1.width to 9720. Perfect as this gives me 9600 usable twips. Except on my Vista system, the borders are 6 pixels (90 twips) on each side. So how do I find out how wide the border is. How much do I need to set my form1.width so that I have 9600 usable twips?
From: David Youngblood on 29 Apr 2010 21:31 "NadCixelsyd" <nadcixelsyd(a)aol.com> wrote... >I need a form that is 80 characters wide. At 120 twips per character, > that's 9600 twips wide. But the border on my XP system is 4 pixels > (60 twips) on each side, so I add 120 twips and set my form1.width to > 9720. Perfect as this gives me 9600 usable twips. > > Except on my Vista system, the borders are 6 pixels (90 twips) on each > side. > > So how do I find out how wide the border is. How much do I need to > set my form1.width so that I have 9600 usable twips? One easy method is to subtract ScaleWidth from Width, Debug.Print Width - ScaleX(ScaleWidth, ScaleMode, vbTwips) David
From: Larry Serflaten on 29 Apr 2010 22:45 "NadCixelsyd" <nadcixelsyd(a)aol.com> wrote > I need a form that is 80 characters wide. At 120 twips per character, > that's 9600 twips wide. But the border on my XP system is 4 pixels > (60 twips) on each side, so I add 120 twips and set my form1.width to > 9720. Perfect as this gives me 9600 usable twips. > > Except on my Vista system, the borders are 6 pixels (90 twips) on each > side. > > So how do I find out how wide the border is. How much do I need to > set my form1.width so that I have 9600 usable twips? How about: bdr = Me.Width - ScaleX(Me.ScaleWidth, Me.ScaleMode, vbTwips) Me.Width = 9600 + bdr LFS
From: Rick Rothstein on 30 Apr 2010 01:58 At worst, you could always do it this way... Me.Width = 9600 Do While Me.ScaleWidth < 9600 Me.Width = Me.Width + 1 Loop -- Rick (MVP - Excel) "NadCixelsyd" <nadcixelsyd(a)aol.com> wrote in message news:72d6c6a9-2a4f-458f-884a-83d17d30da4c(a)r11g2000yqa.googlegroups.com... > I need a form that is 80 characters wide. At 120 twips per character, > that's 9600 twips wide. But the border on my XP system is 4 pixels > (60 twips) on each side, so I add 120 twips and set my form1.width to > 9720. Perfect as this gives me 9600 usable twips. > > Except on my Vista system, the borders are 6 pixels (90 twips) on each > side. > > So how do I find out how wide the border is. How much do I need to > set my form1.width so that I have 9600 usable twips?
From: Horst Heinrich Dittgens on 30 Apr 2010 03:27 > At worst, you could always do it this way... > > Me.Width = 9600 > Do While Me.ScaleWidth < 9600 > Me.Width = Me.Width + 1 > Loop that's why we always need faster CPUs and graphic cards <bg>
|
Next
|
Last
Pages: 1 2 Prev: Drag and drop to system tray Icon Next: Windows 7 taskbar API problems |