Re: Scaling problem - font size
From: M O J O (mojo_at__no_spam_delete_this_newwebsolutions.dk)
Date: 09/06/04
- Next message: Cor Ligthert: "Re: Populating a Listview"
- Previous message: omer maydan: "Event Log Class Problem"
- In reply to: JohnReb: "RE: Scaling problem - font size"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 6 Sep 2004 08:38:32 +0200
Hi John,
Thank you for answering my post!!!!
Unfortunately I cannot see any difference in doing what you suggested.
Please se my answer to Kevin.
Thanks anyway!!!!!
M O J O
"JohnReb" <JohnReb@discussions.microsoft.com> skrev i en meddelelse
news:9524F1F2-88AC-4E0C-BB37-2F5FEE86EE4B@microsoft.com...
> I have had this same problem, and have found that the following workaround
is
> reasonably successful:
>
> In every constructor of every form, as the first statement after the call
to
> InitializeComponent () add:
>
> SizeF sf = Form.GetAutoScaleSize (this.Font);
> this.AutoScaleBaseSize = sf.ToSize ();
>
> I created a class with a static method so I can make it in one line, since
> it is used a lot:
>
> this.AutoScaleBaseSize = autoScaleHelpClass.GetBaseSize (this.Font);
>
>
> After adding this, my app works pretty well among large and small font
> systems, at multiple resolutions. Not perfect, but pretty good.
>
> Hope this helps.
> John
>
>
> "M O J O" wrote:
>
> > Hi,
> >
> > I have my windows-display-font-size set to "Large fonts" and I've
created a
> > new project with two forms. Both of them are 600 width and 400 height.
One
> > have autoscale=true and the other is false. When I run the project, the
two
> > forms shows the same size.
> >
> > Now I open the project (in vs.net) on a computer with
> > windows-display-font-size set to "Small fonts" and my project is screwed
up.
> > Now the width is 501 and the height is 351????????!!!!! When I run the
> > project, the form with autoscale=true is smaller, which I can
understand.
> >
> > My question is .... why isn't my form size 600x400 when I open it on a
> > computer with "Small fonts"? ... and how can I make it the same size?
> >
> > Lets say two develloper worked on the same project. One use "Large
fonts"
> > and the other "Small fonts". How can I make vs.net show the forms at the
> > same size on both devellopers vs.net??
> >
> > STRANGE! :o)
> >
> > Thanks in advance!
> >
> > M O J O
> >
> >
> >
- Next message: Cor Ligthert: "Re: Populating a Listview"
- Previous message: omer maydan: "Event Log Class Problem"
- In reply to: JohnReb: "RE: Scaling problem - font size"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|