Re: Form Height

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bonj (a_at_b.com)
Date: 03/10/04


Date: Wed, 10 Mar 2004 00:49:10 -0000

Use GetClientRect API

"Chuck" <anonymous@discussions.microsoft.com> wrote in message
news:053FC49E-DC69-4596-BA0D-D498923F4AB4@microsoft.com...
> Hello,
>
> I am trying to create a form that shows and hides some controls based on
whether or not the user selects a checkbox. If they put a check in show
options I set the form height to show all the contorls that are below the
check box. If they don't check the box the lower part of the form is
hidden. This works fine, however the problem I'm having is that the height
property includes the form title bar. So if they have there Windows Font
option on extra large the height needs to be different than if they have it
on normal font. Is there a way in VB to tell what Windows default font they
have or is there some other work around to make this work?
>
> Thanks,
> Chuck



Relevant Pages

  • Re: Form Height
    ... > Use GetClientRect API ... > property includes the form title bar. ... So if they have there Windows Font ...
    (microsoft.public.vb.general.discussion)
  • Dialog units vs Bitmap dependence
    ... If you create a dialog and controls from a resource script, ... The existence of dialog-units has ... Pick a font and font-size with a nice pixel to dialog-unit ratio ...
    (microsoft.public.win32.programmer.ui)
  • Re: Creating dialog controls at run-time
    ... If you don't like the font, ... Choose some range for controls like 10,000 to 11,000. ... If you are creating buttons dynamically, you cannot use hardwired integer values. ... incorrectly--then you would not have had the memory leak. ...
    (microsoft.public.vc.mfc)
  • Re: adjusting fonts to computers dpi settings
    ... font size to 6 it will correct all wrong places. ... Yes, it is possible to run through the Controls changing font sizes in that manner, but personally I would not advise doing so, at least until you have looked into this problem a little further. ... Then at run time it converts those twip values into pixels using the twips per pixel setting of the machine on which the code is currently running (15 twips per pixel on a 96 dpi machine, 12 twips per pixel on a 120 dpi machine, etc, etc) and it sets both their size and position in accordance with the returned values. ...
    (microsoft.public.vb.general.discussion)
  • Re: Font problem
    ... Are all of your Windows font files located correctly in the folder at C:\WINDOWS\Fonts? ... Scroll down to TTF and check that this type of file still opens with Windows Font Viewer. ... > To re-associate TTF files to Windows Font Viewer, ...
    (microsoft.public.windowsxp.help_and_support)