Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Changing Windows Font Size


I need a programmatical solution for changing the size of the Windows fonts, ie normal, (96 DPI), Large (120 DPI) etc in exactly the same way as you'd get if you were to change it via Display Properties > Appearance > Font Size. Ideally there would be no reboot although I would accept this if there was no other way but what is important is that the user shouldn't need to be a local administrator to carry this out. I just can't find an adequate solution to this anywhere but it must be possible because Windows can do all this!

Any help much appreciated.

Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Retain Font Styles When Changing Font Size
March 25, 2008

Re: VB6

Hello, everyone. I searched for over two hours for an answer but didn't find a relevant forum example. I am using a richtextbox for my documentation. I made several simple font features such as font sizes and font styles (bold and underline) to the richtextbox. The problem I have is that after I bolded and underlined some of my document text, if I change my document to a different font size, any text that have been bolded or underlined will be undone, so I have to highlight them and bold or underline them again. Does anyone have any advice or any example code to correct it?

The following is a fragment of code in selecting for fontbold and for changing font size:

If Len(Trim(RichTextBox1.SelText)) > 0 Then' For selecting text
RichTextBox1.SelFontSize = 14
End If
RichTextBox1.SelBold = Not (RichTextBox1.SelBold)' For selecting text for bold
RichTextBox1.Font.Size = 14 ' Font size to the whole document or richtextbox

Any advice or help will be greatly appreciated.

Mydanvue

Changing Font Size And Bold And Font ???
dim Heading as string
Heading = "I want to Make this sentance Bold and bigger"

how would i go about making this variable bold and changing the font and font size.
thankyou

Changing Font Size In Drop Down Box??
Is this possible? If so how?

I am using Excel but if anyone knows how to do it in any office product I would really appreciate it.

Thanks

Changing System Font Size
I need fairly simple, Windows version independant code for a way to check and see if the user is using small fonts on their system or not, storing their current font setting if not, and then switching the system to small (96 dpi) fonts during the program, then switching back to their original font size (if needed) at the end of the program. This is necessary because of the design/layout of the program. A few users are saying the text/items at the corner of the screen are running off the edge when using large fonts.

PS Don't worry; this is not homework or anything like that. It's just sort of urgent for the type of programs I design, and I haven't been able to find answers anywhere.

Feel free if you wish to e-mail help/code to:

der29@mindinfo.com

Thanks in advance.
Kevin

Changing Font Size & Bold
How do I change the font size and bold property.

here is the code I am using ;

PHP Code:




Print #1,
FontSize = 10
Print #1, Tab(4); cmbCustomer; Tab(45); cmbCity; ","; cmbState, vbCrLf,
Print #1,
Print #1, Tab(10); "Notes:  "; Note.Text; vbCrLf,

Changing Font Size In A Combo Box
I've created a combo box in excel with the macro recorder. This is the code that came back:

Sub test1()
ActiveSheet.DropDowns.Add(1305, 52.5, 242.25, 39).Select
With Selection
.ListFillRange = "$AW$4:$AW$18"
.LinkedCell = "$AX$5"
.DropDownLines = 5
.Display3DShading = False
End With
End Sub

This always results in a default font size of 8 for my list. Can anyone tell me how to modify the code above to change the font size to 14? Thanks!

Font Size (and Etc.) Keep Reverting / Changing Back
Hey again,

I'm trying to select a bigger font size for someone vision-impaired but the fonts for the textbox keeps the original font size. Every time I run the program it has reverted back to the smaller font. When I look at the form in design mode, everything looks good and big. When I run the program, it has the smaller default font.

I even just threw a picture control up there with a picture in it, and when I run the program to test, it isn't there either! It's just gone.

What is wrong with this? Why does it look okay in design mode, but reverts back when I run the program?

Changing Font Size For Printer Object
Does anyone know how to change font size in using the Printer object? I have 2 applications, one as a DOS-based Clipper application, the other was the same application but created in VB 6.0. The reports for both applications are printed in a dot-matrix printer. When I print my reports in VB using the Printer.Print command, I get smaller fonts, therefore, more lines are printed on a page when compared to the output of my DOS application. Thanks in advance.

Richtextbox Text Changing Color When Font Size Changes
Hello,

I have code to change the font size of the text in my Richtextbox, but when it does change the font size, it also changes the color of whatever the text currently is to black. In other words, if the text is currently red or blue, it will change the text to black.


Code:
combo1.additem "8"
combo1.additem "9"
combo1.additem "10"
combo1.additem "11"
combo1.additem "12"
combo1.listindex = 0

Private Sub Combo1_Click()
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.TextRTF)
RichTextBox1.Font.Size = Combo1.Text
End Sub


Anyone have any ideas why this might be happening ?

Thanks...

Changing Font Size Of Prompt Message Of Inputbox
Hi
I found the prompt message of inputbox is very small and dull, just like
the below statement, how can make the prompt message bold and even italic
or larger ?

Urgent Changing Font Size And Style Programatically
Hi,
We already have a project who's font size is 8. I want to change the
font size and style of allthe forms and controls as well as user controls
programatically instead of manually changing in all forms in design mode
please give some easy method which will not consume more time,thanks in
advance

Changing The Font Size Of Text In A Cell In A PPT Table
How can I change the font size of text in a cell in a PowerPoint table?
Thanks,
Matt



Edited by - jeffers on 10/12/2004 10:39:49 AM

Changing Font Size In Text Mode Printing
Hi guys...

    I'm printing from my application in text mode. That is by using API functions such as OpenPrinter, StartDocPrinter, WritePrinter etc. My problem is that I need a better way to set the font size. At the moment I'm Doing it by appending chr$(15), chr$(18) etc before the string to be printed.
                   I just want to know whether there is any other better options to specify the font size.

I'm using VB 6.0 and Windows 98

Changing Font Size Of Prompt Message Of Inputbox
Hi
I found the prompt message of inputbox is very small and dull, just like
the below statement, how can make the prompt message bold and even italic
or larger ?

AA = inputbox ("Please Input the Correct Password")

Windows Font Size
Anyone knows how to change the Windows font size via API calls or any other method ?
I'm working on deploying an app to about 1000 pc's. The app requires large fonts and 1024x768. 85% of the pc's are like that, but some users decided to change the resolution and/or font size.
I know how to change the resolution, but I can't seem to find a way to change the font size. And to make matters worse, that app will require small fonts in their next update in July. So I have to figure out a way to change the font size to large and back to small in a few months.

Thanks.

!!!Changing The System Font Size Moves The Location Of My Buttons!!! HELP DEMO At 10:00
My program is a picture of a remote and when the buttons are pressed (mouse down) a image of the button pressed down shows up and on mouse up it goes back to normal. I made the buttons with the Image componet from the tool bar. When the system font is changed from small font to lager font the location the buttons are all moved to the right and down a little (both the hotspot and the image). This is visable in VB6 and in the EXE when ran. Any ideas?

Windows Font Changing Dynamically
In VB if we change the windows display font settings to large fonts, then the controls get scaled up and the positions of the controls gets messed up. Especially when you use a background image and align the controls to the image. Can you please let me know how I can disregard this fonts settings in my form. i.e.., I don't want my controls and texts to scale up when we change the windows display settings. Can you please help me out to solve this.

Thanks in advance,
Senthil

Changing Textbox Text Font Type/Size, Bold, Italic, Underline And Color
Hi everyone, this is urgent.

I have a textbox where user can type in there. When user select (highlight) the text they can change the font, size, Bold, Italic, Underline and/or color. It should work like in MS Word.

How do I do this? I have a combo box for Fonts, a combo box for Size, and 4 command buttons for B, I, U, and Color.

Please help?

Thanks

Changing The Scrollbar Size In Windows
Currently I am having difficulty in changing the scrollbar size within windows via VB 6.

I need to allow a user to flick between two different display settings (Classic and Classic Black) but in doing this they are reverted back to the default settings for windows. (i.e. scrollbar size 17).

I am using the Declare Function DeskSetCurrentScheme Lib "desk.cpl" (ByVal SchemeName As String) As Long to change the desktop scheme. Now I need to be able to set the scrollbars throughout the whole of windows to something like 40.

Does anyone have any idea how to do this?

Windows Changing Size Of Textboxes/Text?
Hi,
I'm encountering a weird problem.
If I run my programm on a specific computer, the seize of textboxes and text is different to the size on all the others. I tried to change the windows settings to "windows standard", but it was of no help. Neither am I able to change the settings of my computer to show the same effect as discribed above.
Does anybody else have a clue?
(It's Win98 if it matters)

Making A Program Work In SMALL AND LARGE Font Size Windows Settings
Hello,

I found why my program's command buttons, picture boxes, forms themselves, lables, etc. width and height are larger than they should be and not positioned where they should be when I install my program on some computers (5 out of the 10 computers I installed my program on have this problem). It's because my program was designed on my computer with my WINDOWS FONT SIZE SETTING AT: SMALL FONTS. So now my program only looks right on computers with the same setting.

If a computer is set at LARGE FONTS, then my command buttons and everything else's widths and heights are too big and they are all in different positions on my form than they should be. My program is USELESS when someone has their computer settings for WINDOWS FONT SIZE set at: LARGE FONTS.

I want to make my program work on both settings, not just one or the other.

Does anyone know what I would have to do to get my program to work on a computer that is set at SMALL FONTS or LARGE FONTS rather than JUST SMALL FONTS like it does now?

Thanks for your help,

Jim Limborg
jimmy@a1wheels.com
http://www.a1wheels.com/jameslimborg.html

Printer Font Size Vs Picturebox/form/font Size
HI Everibody.
Sorry for my bad English

Why the printer object font size is different as in Picturebox or form font size property?

I copyied in a PictureBox all the properties availabe in the printer object (width, height, scalemode, scalewidth, etc, etc) to simulate a printer object, but the font size in the picturebox is always greater therefore printer.currentX & Y does not match picture1.currentX & Y

Now, how can I configure a picturebox that matches perfectly the printer proportion? I need it to make Preview routine

How can I caculate the correct scale for Picture1?

Windows Changing Size Of Textboxes/Text?(*SOLVED By Restart*)
Hi,
I'm encountering a weird problem.
If I run my programm on a specific computer, the seize of textboxes and text is different to the size on all the others. I tried to change the windows settings to "windows standard", but it was of no help. Neither am I able to change the settings of my computer to show the same effect as discribed above.
Does anybody else have a clue?
(It's Win98 if it matters)

Detecting The Current Font And Font Size On Various Lines In A Rich Text Box.
I have written an editor that uses a rich text box as the main text area.

The editor allows the user to select a font and font size on the toolbar.

My question is, how does one get the combo box text (for both the font and font size) to display the font or font size for the current line of the current character location?

Meaning, if I were to type in two lines, the first line being Arial 12pt, and the second line being Tahoma 14pt, how would I get the program to display the font and font size in the combo boxes?

I know about SelFont, SelStart and such, but I am not selecting any text. I am merely moving the cursor up or down and need to be able to display the font and font size for where the cursor currently is.

Anyone have any ideas?

I thank you in advance.

Detecting Font And Font Size On Various Lines In A Rich Text Box.
I have written a basic editor that uses fonts and such, however when I select a different line (while entering text into the text area of the rich text box), it doesn't display the font or font size for that particular location.

Does anyone have any ideas where I can look to solve this problem?


I thank you in advance for any information you may be able to share with me.

How To Get The Font Name And Font Size Of Header/footer Text?
Hi Everybody

Simple question.

In one of my procedures, I write the VBA Excel code set the text for headers and footer specifying the font name and font size (code line shown below in part).


Code:
'...
'...
'worksheetName has been previously defined to contain the
'name of the worksheet being handled
fullFilename = ActiveWorkbook.FullName
footerText = fullFilename & "[" & worksheetName & "]"
With ActiveSheet.PageSetup
.LeftFooter = "&""Times New Roman,Regular""&06" & footerText
End With
'...
'...


However, when I try to read the same (header/footer text) using code and assign it to a string variable, it actually includes the VBA code referring to the font name and font size as well. This is what I get (the contents of the string variable is shown below).

&"Times New Roman,Regular"&06H:MSOFFICEMY DOCUMENTSCombined National Monthly ReportTest11.xls[SBU - East]

Have a look at all the text prior to "H:..."

But when you see the header/footer content in pagesetup -> headers/footers, you only see the actual text viz :-

"H:MSOFFICEMY DOCUMENTSCombined National Monthly ReportTest11.xls[SBU - East]"


Is there a way to read this actual text only in to a string variable?


Best regards


Deepak Agarwal

How To Change The Font Type And Font Size For A Menu Bar?
Dear all,
I meet a problem in my application. How can i change the font type and font size for the menu used in th form? Since my application is run on 1280x1024, it is too small to see the type on the menu bar. Could anyone help me? Very urgent!!! Thanks.

Paul

Changing Default DC Font To MsFlexGrid.Font.Name
When I need to obtain a font LONG value for a command button, I make the following:


ButtonFont = SendMessage(Command1.hWnd, WM_GETFONT, 0&, 0&)


I need to do the same for a MsFlexGrid and the function returns 0.
In this case, and because I need to change de default Device Context font (SYSTEM) to the MsFlexGrid.Font.Name, I'm unable to change it.

How can this question be solved ?

Thanks in advance

Font Type & Font Size
Hi,

I was wondering what font type and font size you usually use in your vb projects.
What font size is too small, and what size is too big?
Do you use different fonts in your project? or maybe different font sizes?

As you noticed my question is some kind of a poll, I hope there will be much replies.

Thank you for your time!

OsMo

Web Font Question: Font Size
has anyone by chance tried to figure out a way to convert font point size to html size?

Like FontSize @ 8 = HTML font size 1???


Thanks!

(I have figured out how to change web page settings on the fly...BG color...text color...link color...ONLY for less complex pages)

Font Size Vs Font Selected?
I'm creating the editing toolbar for a Rich Text Box, and am starting work on the Font selector (combo) & Font Size selector (combo) and was wondering: Is the size dependant on the font chosen or can the font be any size the user chooses?

|
+--JDMils
|
+--VB6
+--VB Dot Net
|
+-- Navman GPS Forums @ http://forum.jdmils.com
|

Font Size And Font Color
how do i let the user pick what font and what what color of a font with the common dialog?

How To Use The Dos Font And Avoid Windows Font While Printing Reports
how to use the dos font and avoid windows font while printing reports in textmode from vb

Changing The Size Of The Forms & Controls According To The Screen Size
I am creating an application in VB 6 that has many forms and each forms has
several different controls. I am working on a 21' screen how will I take
care of the form sizes and the controls in it when it will run on a 15'
screen.

I have already written this code for screen

If Me.Height >= Screen.Height Then
Me.Top = 0
Else
Me.Top = (Screen.Height - Me.Height) / 2
End If
If Me.Width >= Screen.Width Then
Me.Left = 0
Else
Me.Left = (Screen.Width - Me.Width) / 2
End If

How do I make all my controls resizable at runtime?

Thanks in advance

Textbox Size/font Size
Does anyone know how to resize a textbox (at runtime), so that if you change the font size for it, it'll adjust to fit the font?

Font Name And Font Size
How Do I change the .FontSize and .FontName properties of Printer object from VB 5.0. I'm using an Generic Text Only driver for an Epson TMU-200.
Thanks....

Font Size
I have had some really annoying problems with the font size options available in the Display options. Two of my games work in different ways and it isn't making sense. I made a pong game and it only runs correctly using large font. The collisions won't work otherwise. I am working on a raycasting engine. That only works in small font. Can anyone tell me why font size would have any effect on my games. It has nothing to do with resolution from what I can tell.

Size Of Font
Although this is for use in a DirectX application, I feel it doesn't apply to the DirectX forum because it's more of a general programming tip.

I'm trying to write a routine that will draw a line of text (monospaced font, variable size of letters, variable size of font) in the center of the screen. I tried using the algorithm Middle of screen - Font Size * Letters / 2, but the word always gets misplaced because it turns out that the length in pixes of letters in a font are much smaller than their pt. size.

The question is: Is there a way to accurately measure the length of a word you'll be printing on the screen (In monospaced font)?

Font Size
Greetings, all and happy new year. I find it interesting that as soon as I return to the (great new layout) forum, the current topic seems to be RTB's. My question is similar, but I don't think needs an RTB. I just want to display a label at the top of my form whose font size is 28 or 30. Is there an easy way to change this so I can see it on my form at design time? If not, do I have to use a RTB or can I just assign the label a size such as form.selfontsize = 30
Thx in advance!!
-R

Set Font Size
How to i set the font size in a script that writes a value onto a doc?

Getting Font Size
How would i go about getting the Fontsize of a Listbox or RichTextbox, Not in Actual size Like 14 or 12 or something but in Pixels.
Or is Fontsize the actual Pixel Height?

Also... How do you Convert Pixel Size to Twips?


I am printing text in a picture box and i need the picture box to rezise depending on the Font Size.


Thanks alot

Font Size
I think that it is possible. Cause if you have a scroll mouse. You can hold the ctrl key and scroll in IE and it makes the images and fonts bigger or smaller. So yes i do think it's possible. How to get started? I do not know.

Font And Size
Hi!
Still working on my NotePad thing. My problem is that I don't know hoe to change the font and/or size on the marked text. And another problem is that when i mark a text and then click my ComboBox, the text gets unmarked. Plz, help me!

/ Erik

Font Size - Please Help!
I have a textbox in my form called - "TextBox1".
I want to have a button, when you click it a window will open and lets you enter font size.
Font size must change just in my "TextBox1"
How can I do that?

Thank you for help

What Is The Font Size???
I am working with an RTB control,

Does anyone know how to get the current font size using an API? or a means other than rtb.selfontsize?

rtb.selfontsize only contains font size AFTER the character was typed or cursor moved. I need to know the fontsize BEFORE the user types, so if the fontsize changes, before the user types...i want to know what the font size is.

Min Font Size?
It seems that the min Font.Size is 8. When I set MyFont.Size = 6, there is no apparent difference with that of size 8.
Can anyone tell me why and how can I reduce the font size?

Thx for help!

Font Size In VB.Net
Sorry for posting here instead of VB.Net forum.
Does anybody know how to change the size of font of control in VB.Net? There is a Font class, but no success so far with declaration and creation of the object from it.
Thank you
Vlad

Font Size
How can I know the font size of current system whether "Small Font" or "Large Font"?

Programmer.
Multimedia/Image Processing/FA/CADCAM
C,V/B,V/C++

Font Size
Hello,

I have a control that has font property.

I need to get the Font height in pixels. I remember that there were some way to do that but cannot remeber the function.

Thanks in advance.

Copyright © 2005-08 www.BigResource.com, All rights reserved