|
|
 |
 |
 |
 |
making fonts size fixed
Hello, I have a project with windows forms. The size of the forms is fixed, and the text in the form is made to fit exactly in the form. The problem is that if the user changes the font size in windows, the form itself doesn't change its size but the text becomes bigger, and only part of it is seen. Is there anyway to make the text remain in the same size always, regardless of the font size of windows? thanks, -- dshemesh
Hello dshemesh, Why not tot use AutoScale for the controls, or override the Control.ScaleCore for your cases? --- WBR, Michael Nemtsev [.NET/C# MVP]. My blog: http://spaces.live.com/laflour Team blog: http://devkids.blogspot.com/ "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo d> Hello, d> I have a project with windows forms. The size of the forms is fixed, d> and the d> text in the form is made to fit exactly in the form. The problem is d> that if d> the user changes the font size in windows, the form itself doesn't d> change its d> size but the text becomes bigger, and only part of it is seen. Is d> there d> anyway to make the text remain in the same size always, regardless of d> the d> font size of windows? d> thanks, d>
-----------------------------------------------Reply-----------------------------------------------
I'm not sure what these things do. If AutoScale changes the size of the form it's not good for me. I really need the forms to have a fixed size. What does Control.ScaleCore do? -- dshemesh
"Michael Nemtsev" wrote: > Hello dshemesh, > Why not tot use AutoScale for the controls, or override the Control.ScaleCore > for your cases? > --- > WBR, Michael Nemtsev [.NET/C# MVP]. > My blog: http://spaces.live.com/laflour > Team blog: http://devkids.blogspot.com/ > "The greatest danger for most of us is not that our aim is too high and we > miss it, but that it is too low and we reach it" (c) Michelangelo > d> Hello, > d> I have a project with windows forms. The size of the forms is fixed, > d> and the > d> text in the form is made to fit exactly in the form. The problem is > d> that if > d> the user changes the font size in windows, the form itself doesn't > d> change its > d> size but the text becomes bigger, and only part of it is seen. Is > d> there > d> anyway to make the text remain in the same size always, regardless of > d> the > d> font size of windows? > d> thanks, > d>
Hi, "dshemesh" <dshem @discussions.microsoft.com> wrote in message news:484A8C38-A605-438E-B331-20367B7EDD44@microsoft.com... > Hello, > I have a project with windows forms. The size of the forms is fixed, and > the > text in the form is made to fit exactly in the form. The problem is that > if > the user changes the font size in windows, the form itself doesn't change > its > size but the text becomes bigger, and only part of it is seen. Is there > anyway to make the text remain in the same size always, regardless of the > font size of windows?
I think that is the incorrect approach, the correct approach is how to modify my program in such a way that the user can modify the fonts and my program adapt to the new form. You can use MeasureString to know how many space a given text will occupy , so you can modify your form to show the entire text.
-----------------------------------------------Reply-----------------------------------------------
On Tue, 29 May 2007 02:28:01 -0700, dshemesh <dshem @discussions.microsoft.com> wrote: > [...] The problem is that if > the user changes the font size in windows, the form itself doesn't > change its > size but the text becomes bigger, and only part of it is seen. Is there > anyway to make the text remain in the same size always, regardless of the > font size of windows? If the user has changed the screen resolution or font size in Windows, they did so for a good reason. If you insist on preventing that setting from having effect (even if you could), you may very well render your application unusable to the user. Between the suggestions from Michael and Ignacio, you should be able to come up with a solution in which your application is usable regardless of the way the user has configured their Windows computer. Pete
|
 |
 |
 |
 |
|