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.
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
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
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.
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.
How Can I Auto Change Font Size On Drag And Drop To RTB
I need a quick solution in correcting someone else's work.
I have a form with two listboxes and a RTB. The font is size 8 and bold in listbox1. It's size 10 and Italic in listbox2. Unfortunatly, The RTB is auto-saved and printed as a report and there is no opportunity to make the text uniform beforehand. Needless to say, the RTB and the printed report looks like crap.
I would like to be able to make the text automatically uniform when the drag is dropped into the RTB. At one point last night, I had it where it would correct before it saved, but even that doesn't work now.
What I really want is to correct this when it GOES INTO the RTB so that it doesn't look so crappy on screen.
Any help is appreciated.
[Edited by Wendy Jackson on 09-12-2000 at 12:41 PM]
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:
Thanks in advance.
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.
Changing Font Size && Bold
How do I change the font size and bold property.
here is the code I am using ;
FontSize = 10
Print #1, Tab(4); cmbCustomer; Tab(45); cmbCity; ","; cmbState, vbCrLf,
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:
ActiveSheet.DropDowns.Add(1305, 52.5, 242.25, 39).Select
.ListFillRange = "$AW$4:$AW$18"
.LinkedCell = "$AX$5"
.DropDownLines = 5
.Display3DShading = False
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
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
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.
combo1.listindex = 0
Private Sub Combo1_Click()
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.TextRTF)
RichTextBox1.Font.Size = Combo1.Text
Anyone have any ideas why this might be happening ?
Urgent Changing Font Size And Style Programatically
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
Changing Font Size In Text Mode Printing
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
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")
!!!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?
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.
Printer Font Size Vs Picturebox/form/font Size
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?
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?
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).
'worksheetName has been previously defined to contain the
'name of the worksheet being handled
fullFilename = ActiveWorkbook.FullName
footerText = fullFilename & "[" & worksheetName & "]"
.LeftFooter = "&""Times New Roman,Regular""&06" & footerText
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?
How To Change The Font Type And Font Size For A Menu Bar?
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.
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
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!
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???
(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?
+--VB Dot Net
+-- Navman GPS Forums @ http://forum.jdmils.com
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'
I have already written this code for screen
If Me.Height >= Screen.Height Then
Me.Top = 0
Me.Top = (Screen.Height - Me.Height) / 2
If Me.Width >= Screen.Width Then
Me.Left = 0
Me.Left = (Screen.Width - Me.Width) / 2
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.
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)?
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!!
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.
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
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!
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.
How can I know the font size of current system whether "Small Font" or "Large Font"?
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.
Twips, DPI, && Font Size...
I personally got VERY tired of messing with the problem of my forms and their controls not displaying properly on computer systems with different "Font Size" or DPI settings. Instead of purchasing a 3rd-party ActiveX control to do this for me, I created my own function.... here it is, and I've tested it extensively on ALL components for a "VB Enterprise Edition Controls" and "Standard EXE" projects. The ONLY thing this doesn't resize is the caption bar and caption bar text, which will offset the form height by a few pixels. Other than that (very small issue), it works great! Here's a copy of the code for all of you looking for a solution to this nightmare also:
Private Sub Form_Load()
SetForm (15) 'Call the function with the original twips-per-pixel value
Private Function SetForm(Lng_OriginalDPI As Long)
Dim Sng_X As Single
Dim Sng_Y As Single
Dim Udt_Control As Control
On Error GoTo NoProperty 'Error called when a control does not
'support a property or method
'Calculate new x,y coordinates for controls and font sizes
Sng_X = Screen.TwipsPerPixelX / Lng_OriginalDPI
Sng_Y = Screen.TwipsPerPixelY / Lng_OriginalDPI
'Resize x,y property values & font sizes accordingly on main form
Me.Width = Me.Width * Sng_X
Me.Height = Me.Height * Sng_Y
Me.FontSize = Me.FontSize * Sng_X
'Resize x,y property values & font sizes accordingly to each control
'on the form
For Each Udt_Control In Me.Controls
Udt_Control.X1 = Udt_Control.X1 * Sng_X
Udt_Control.Y1 = Udt_Control.Y1 * Sng_Y
Udt_Control.X2 = Udt_Control.X2 * Sng_X
Udt_Control.Y2 = Udt_Control.Y2 * Sng_Y
Udt_Control.Left = Udt_Control.Left * Sng_X
Udt_Control.Top = Udt_Control.Top * Sng_Y
Udt_Control.Width = Udt_Control.Width * Sng_X
Udt_Control.Height = Udt_Control.Height * Sng_Y
Udt_Control.FontSize = Udt_Control.FontSize * Sng_X
If Err.Number = 438 Then 'Does not support current property or method
Resume Next 'Continue to the next statement
- Eric Brown
Problem With Font Size
I've tested my program on different displays and found a little problem.
When font size (display>settings>advanced) is set to "large", all controls in program are resized.
Is there any way I can prevent it?
Billow is the sample form.
Font Size Different On Different Machines
Why with two machines set to the same screen resolution and small fonts, does the text appear larger on one machine? This is causing some of the label and caption text for some of the controls to be cut off.
All of the fonts for these controls are set to 8pt MS San Serif.
Any help would be appreciated.
Font Size In DirectX 7
Can i change the font size in DirectDraw of DirectX 7 while using "DrawText" to paint text?