473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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
May 29 '07 #1
4 1416
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

dHello,
dI have a project with windows forms. The size of the forms is fixed,
dand the
dtext in the form is made to fit exactly in the form. The problem is
dthat if
dthe user changes the font size in windows, the form itself doesn't
dchange its
dsize but the text becomes bigger, and only part of it is seen. Is
dthere
danyway to make the text remain in the same size always, regardless of
dthe
dfont size of windows?
dthanks,
d>
May 29 '07 #2
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

dHello,
dI have a project with windows forms. The size of the forms is fixed,
dand the
dtext in the form is made to fit exactly in the form. The problem is
dthat if
dthe user changes the font size in windows, the form itself doesn't
dchange its
dsize but the text becomes bigger, and only part of it is seen. Is
dthere
danyway to make the text remain in the same size always, regardless of
dthe
dfont size of windows?
dthanks,
d>
May 29 '07 #3
Hi,

"dshemesh" <ds******@discussions.microsoft.comwrote in message
news:48**********************************@microsof t.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.
May 29 '07 #4
On Tue, 29 May 2007 02:28:01 -0700, dshemesh
<ds******@discussions.microsoft.comwrote:
[...] 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
May 29 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Jay Levitt | last post by:
I'm just starting to play around with CSS and MovableType. My home page (http://www.jay.fm) now validates on both the CSS and the XHTML. However, the Google cached version shows the wrong font in...
66
by: Alan Illeman | last post by:
Is there a listing of serif fonts and san-serif fonts somewhere? Regards, Alan -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A:...
3
by: phil-news-nospam | last post by:
Here's an example I found on another site. I was visiting the site named in the URL in this image, and got the registrar's site because the domain had apparently expired. Look at the boxes along...
57
by: Chris Tomlinson | last post by:
Hi all, Hope someone is able to help. I notice when I design a basic HTML page, it is affected if a WinXP user has Large Fonts set in their Control Panel. However some pages, e.g....
19
by: Viken Karaguesian | last post by:
Hello everyone, Just an observation here: the CSS newsgroup (comp.infosystems.www.authoring.stylesheets) is totally dead. Why?... Anyway here's my discussion point: What is the most versatile...
2
by: Steve | last post by:
A few months ago I went to a web site that looked terrible in Firefox, but fine in IE and Opera. It turned out that because I had reset my default font size in Firefox to be larger, that my...
6
by: Steve | last post by:
I have a div with two - three paragrahs in it. Each paragraph has its own inline style tag with its own font size setting. When I set the last paragraph's font size the font sizes for ALL of...
4
by: Mythran | last post by:
Reposted, originally posted in microsoft.public.vb.crystal which is not an MSDN managed newsgroup.... POST BELOW --------------------- We develop our applications and reports using Visual...
10
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.