473,698 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Forms, change font of the controls at runtime?

Hi,

I have a window form with controls (labels, buttons...). I want the
user to have possibility to change the font (name and size) of the
controls. But when the font is changed the size of the controls changed
and some of the controls overlap each other.

How could I fix this problem?

Thanks.

Nov 17 '05 #1
4 2587
Hi,

As a side note you could also need to relocate them, btw it's not an easy
task !
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Iwan Petrow" <xx****@abv.b g> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hi,

I have a window form with controls (labels, buttons...). I want the
user to have possibility to change the font (name and size) of the
controls. But when the font is changed the size of the controls changed
and some of the controls overlap each other.

How could I fix this problem?

Thanks.

Nov 17 '05 #2
Hi,

As a side note you could also need to relocate them, btw it's not an easy
task !
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Iwan Petrow" <xx****@abv.b g> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hi,

I have a window form with controls (labels, buttons...). I want the
user to have possibility to change the font (name and size) of the
controls. But when the font is changed the size of the controls changed
and some of the controls overlap each other.

How could I fix this problem?

Thanks.

Nov 17 '05 #3
Hi,

Of course you have to recalculate the size needed for the controls.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Iwan Petrow" <xx****@abv.b g> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hi,

I have a window form with controls (labels, buttons...). I want the
user to have possibility to change the font (name and size) of the
controls. But when the font is changed the size of the controls changed
and some of the controls overlap each other.

How could I fix this problem?

Thanks.

Nov 17 '05 #4
Hi,

Of course you have to recalculate the size needed for the controls.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Iwan Petrow" <xx****@abv.b g> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hi,

I have a window form with controls (labels, buttons...). I want the
user to have possibility to change the font (name and size) of the
controls. But when the font is changed the size of the controls changed
and some of the controls overlap each other.

How could I fix this problem?

Thanks.

Nov 17 '05 #5

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

Similar topics

0
1004
by: Paul | last post by:
I have a c# Windows Forms application that seems to work fine in Windows 2000 and Windows XP. However I have three problems in Windows 98. 1) On a form with about 200 data bound controls when I try to open a dialog form I get an error. Message = Invalid Parameter Used. Source = System.Drawing 2) On Some forms the drop down box does not show an arrow but shows a number 6.
5
452
by: Olli Krollmann | last post by:
hello folks, we have been developing several .NET-based windows forms applications during the last two years. there are two mysterious display problems that we have encountered so far but have been unable to find any information about: 1. distorted fonts. when placing label controls on forms or setting form or grid captions we often notice that the label or title text is stretched out in the left part, displays correctly in the middle...
0
2310
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the example source code can be downloaded here: http://www.blogitek.com/timhaughton/archives/files/User%20Interrogator%20And%20TDD.zip The article text is below. Not sure what it will do to the formatting when
0
2148
by: Sinisa | last post by:
I have a Windows form which has multiple groups of the same window controls. I wanted to create a control class that has the standard controls in one. something like: public class Sensor : System.Windows.Forms.Control { private System.Windows.Forms.TextBox Calculation;
0
263
by: Iwan Petrow | last post by:
Hi, I have a window form with controls (labels, buttons...). I want the user to have possibility to change the font (name and size) of the controls. But when the font is changed the size of the controls changed and some of the controls overlap each other. How could I fix this problem? Thanks.
2
14018
by: JohnR | last post by:
Let's say I have an MDI parent form with a textbox. If I create an MDI child form and, at runtime, move the MDI child window over the textbox on the MDI parent, the textbox appears in front of the MDI child window. How can I make the MDI child window appear in front of any controls that may be on the MDI parent? thanks, John
4
3156
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is inherited from a
4
4178
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
1
5766
by: =?Utf-8?B?dmFwb3I=?= | last post by:
I'm interested in getting a Windows forms font to resize similar to what happens with the Windows toolbars when the end-user changes the system font. With the Windows toolbar, the font 'grows' as the user changes the computer settings. I'm not interested in the event that fires, what I need is an approach to setting the font that is not hard-coded to a specific size such as 10 or 12. I don't see that available in .NET controls, am I missing...
21
3364
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters a zipcode that is unknown this form will open. I don't want users to modify any of this customers data until they close the zipcode form. Normally this can accomplished using a modal form, however this prevents me from opening a new copy of...
0
8609
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
9170
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
9031
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...
0
7739
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...
1
6528
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
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();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.