Re: Form is truncated.....
- From: "Mike Williams" <mikea@xxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 09:17:59 -0000
"John Morley" <jmorley@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:u8BLOFtMIHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
A user is reporting that a form in my VB6 application is
truncated at the bottom when it is displayed. Approximately
the lower 1/3 of the form is not visible.
It will be the user's dpi settings (what used to be called "small fonts" and "large fonts"), and possibly also the different height of the Caption bar and the user's task bar on different systems. Most machines run at 96 dpi (15 twips per pixel) but quite a lot run at 120 dpi (12 twips per pixel) and some at various other settings. For example, if a Form is such a size that on your own system it is 800 pixels high and if your development machine is running at 96 dpi then VB will use the value of 12000 twips for its overall height, and that is the value it will store in your exe. If you then run that exe on a machine that happens to be running at 12 twips per pixel the VB runtime will set its size to however many pixels happens to equate to 12000 twips on that specific machine, which on the 12 twips per pixel will be 1000 pixels (25 per cent larger than it was on your development machine). You really do need to add code check all of the settings and screen sizes and task bar size and position and dpi settings at run time and to adjust everything accordingly. This will often include not only changing the size of your Form but also changing either the size or position (or both) of all its contained controls. This is not just a VB thing (although certain parts are specific to VB). All good applications, whether they are VB applications or not, always need to check the display on which they are running and adjust themselves accordingly.
Mike
.
- Follow-Ups:
- Re: Form is truncated.....
- From: Bert van den Dongen
- Re: Form is truncated.....
- References:
- Form is truncated.....
- From: John Morley
- Form is truncated.....
- Prev by Date: Re: The inaugural VB6 vs dot net test
- Next by Date: Re: Form is truncated.....
- Previous by thread: Re: Form is truncated.....
- Next by thread: Re: Form is truncated.....
- Index(es):
Relevant Pages
|
Loading