473,725 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programming UI w/ 120DPI fonts.

Does anybody here have any sites or information about
programming a VB.NET UI with 120DPI fonts. There are a
lot of form size properties that seem to go way out of
whack when you change the font DPI. Clientsize, and size
properties seem way bigger than my resolution is even set
to. I know how to detect the 120 font DPI, but I'm really
confused as to the relationship between Control size
properties and the inreast font DPI.

Does the unit of measurement change? When I have my
computers resolution set to 1280X1024 and 120DPI fonts,
the size property on my forms can come out to 2500 or even
higher. Since the form is maximized, it can't possibly be
representing it in pixels, and not only that but I never
changed it anyways.

Is there an easy way to dynamically change component sizes
with a calculation containing the font DPI so everything
fits properly? Has anyone else had to try and deal with
this problem?

Thanks in advance to all those who can help, and I
understand that this isn't strictly a VB.NET problem but
hopefully somebody has some insight.
Nov 20 '05 #1
1 1885
Hello, Jason:

The font size is handled through the Form.AutoScaleB aseSize and Form.AutoScale properties (see http://msdn.microsoft.com/library/de...ScaleTopic.asp)

You can also find a single explanation at http://msdn.microsoft.com/library/de...ms12102002.asp.

You can get the DpiX and DpiY properties of a graphics object created from a control (for example) to know the current font size (72 dots=1 inch).

Let me make a reflexion at this point: What Windows names "Font size" is in fact "device resolution" in physical units... but actual monitors don't inform Windows about the REAL size of a pixel (at 800x600, for example), which could be very helpful. Why the manufacturers don't want to do this?

Regards.
"Jason" <an*******@disc ussions.microso ft.com> escribió en el mensaje news:07******** *************** *****@phx.gbl.. .
| Does anybody here have any sites or information about
| programming a VB.NET UI with 120DPI fonts. There are a
| lot of form size properties that seem to go way out of
| whack when you change the font DPI. Clientsize, and size
| properties seem way bigger than my resolution is even set
| to. I know how to detect the 120 font DPI, but I'm really
| confused as to the relationship between Control size
| properties and the inreast font DPI.
|
| Does the unit of measurement change? When I have my
| computers resolution set to 1280X1024 and 120DPI fonts,
| the size property on my forms can come out to 2500 or even
| higher. Since the form is maximized, it can't possibly be
| representing it in pixels, and not only that but I never
| changed it anyways.
|
| Is there an easy way to dynamically change component sizes
| with a calculation containing the font DPI so everything
| fits properly? Has anyone else had to try and deal with
| this problem?
|
| Thanks in advance to all those who can help, and I
| understand that this isn't strictly a VB.NET problem but
| hopefully somebody has some insight.
|
|
Nov 20 '05 #2

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

Similar topics

1
2820
by: C. Alexander | last post by:
I have a picture box set to pixels 640x480 on a form. Autoresize is false The picture inside is 640x480px. If a user has their Display DPI settings set to 96dpi, the form and picture box looks fine. But if a user has their DPI set to 120dpi, the form grew very large, and the background picture is the only thing not streched out, leaving a large space between the
4
11966
by: L | last post by:
Hi there, Does C# support OpenType fonts? My c# application is not recognizing OpenType fonts. Thanks, Lalasa.
5
3266
by: Alex Glass | last post by:
I have created a winforms application and I designed it with the normal display settings, (96DPI) however, when I set the font settings to 120 DPI, my application text labels look all messed up. Does anyone know a work-around for this problem? Thanks for any advice, Alex
2
1925
by: anil | last post by:
If any body knows how to include and use fonts in C program..please let me know,,since I was doing 'Character recognition' for hindi I dont know how to link those fonts to my program.. --anil kumaranil.b@gmail.com
4
3679
by: Aaron Gray | last post by:
Is there anyway to get a list of all the availiable fonts in Javascript ? Aaron
2
2934
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on servers configured with large fonts. For a reason I cant explain, not only the font changes when settings the window on large font but all the widgets seem to be resized. This is kind of problematic because I have to redraw (resize) all the widgets...
1
3255
by: Atul | last post by:
Hi, I have installed a truetype font (.ttf) on a linux machne (SUSE linux 10, KDE) by copying it to my .fonts folder. I can use the font in all applications like open-office and firefox browser. However, I cannot use the font in a python app that I am writing. The list returned by Tkfont.families does not contain this particular font. Any suggestions ?
0
1487
by: jkristia | last post by:
I'm completely lost right now, and can't figure out how to solve this problem. I want my app and dialogs to show up in the same position and same size as when they were closed. For that I do the following. In the constructor I call Util.LoadPosition(control) which reads in the position and size
12
2346
by: ctclibby | last post by:
Hi all Have a customer that wants a specific font included in her web page design; Comic Sans MS. This is one of the MS core fonts. The problem I have is that some of the *nix browsers do NOT include these fonts by default. http://www.diamondvet.com/test renders those fonts correctly using an XP box. After I installed those fonts on my machine, firefox and mozilla both rendered them correctly. So here is the question:
0
8888
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.