Re: form size suddenly not correct
- From: "Mike Williams" <Mike@xxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Jul 2005 17:57:23 +0100
"Duncan Chesley" <BioColor@xxxxxxx> wrote in message
news:grpnd198uepuhf0thi13bir7pavnq5q2p7@xxxxxxxxxx
> I recently updated my ATI Radeon 9200 video driver and
> a couple of optional patches from Microsoft (including .net
> framework sp1 I think). I'm running VB6SP6. Now my fonts
> and form sizes appear incorrectly.
As Frank has already said (and as you seem to have since confirmed) it is
almost certainly a driver problem on your own machine. However, if you want
your Forms to always be a fixed pixel size (800 x 600 pixels in your case) I
would definitely advise that you set the size at run time by reading the
systems "pixels per inch" (or twips per pixel) setting and altering the
Width and height properties accordingly. I would also advise that you do
exactly the same for all the Controls on your Form, while also taking into
account the different border thicknesses on different machines. VB *always*
stores the desired size using Twips as the unit of measurement (both in your
..frm files and in your compiled exe file), and it do so regardless of the
values you are using for ScaleMode or whatever at design time. Moreover, it
determines the "required number of twips" from the current settings of your
own development machine (or whatever other machine you happen to compile it
on). For example, if you set the Form's ScaleMode property to vbPixels and
then position something at location (100, 100) and then compile / save it VB
will "read" the twips per pixel value of your current development machine
and set the "twip coordinates" accordingly (1200, 1200 on a typical large
fonts machine) and it will then store those twip values in your .frm and
your .exe files. Then, when your app is run on another machine, the VB
runtime on that machine will "pick out" the stored twip values from the exe
file and it will determine the "pixel position" according to the twips per
pixel on that specific machine, resulting in different placements on
different machines. If you want to reliably fix the pixel size of a Form
(and the size and position of its controls) then you've got to do it in code
at run time.
Mike
.
- Follow-Ups:
- Re: form size suddenly not correct
- From: Duncan Chesley
- Re: form size suddenly not correct
- References:
- form size suddenly not correct
- From: Duncan Chesley
- form size suddenly not correct
- Prev by Date: Re: do events
- Next by Date: fix modified date
- Previous by thread: Re: form size suddenly not correct
- Next by thread: Re: form size suddenly not correct
- Index(es):
Relevant Pages
|