473,385 Members | 1,888 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,385 software developers and data experts.

problems with changing fonts

Everytime I change a font (from the properties window) I get an error. I
can remove the line of code VB generates and I get no errors, but I would
like to be able to change fonts. Any ideas what is causing this? I have
tried adding Imports System.Drawing.Font without any affect.
Sep 19 '05 #1
2 1794
Well, it would be helpful to know what the error is and the code you
used to change the font.

Sep 21 '05 #2
I have been using the properties of a control in the design window to change
the fonts. I do not directly change the code. Here is an example of the
code VB generates:

Me.txtFirst.Font = New System.Drawing.Font("Arial", 8.25!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
CType(0, Byte))

The exception I get is as follow:

An unhandled exception has occurred in your application. If you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will be shut down immediately.

Overflow or underflow in arithmetic operation.

************** Exception Text **************

System.ArithmeticException: Overflow or underflow in the arithmetic
operation.

at System.Drawing.Font.Initialize(FontFamily family, Single emSize,
FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean
gdiVerticalFont)

at System.Drawing.Font.Initialize(String familyName, Single emSize,
FontStyle style, GraphicsUnit unit)

at System.Drawing.Font..ctor(String familyName, Single emSize)

at
Infragistics.Win.UltraWinToolbars.UltraToolbarsMan ager.DisplayToolTip(String
text)

at
Infragistics.Win.UltraWinToolbars.UltraToolbarsMan ager.DisplayToolTip(ToolBa
se tool)

at Infragistics.Win.UltraWinToolbars.ToolBase.Display ToolTip()

at
Infragistics.Win.UltraWinToolbars.UltraToolbarsMan ager.set_ImmediateToolTipD
isplayMode(Boolean value)

at Infragistics.Win.UltraWinToolbars.ButtonToolUIElem ent.OnMouseHover()

at Infragistics.Win.ControlUIElementBase.NotifyMouseH over(UIElement
element)

at Infragistics.Win.ControlUIElementBase.OnHoverTimer _Tick(Object sender,
EventArgs e)

at System.Windows.Forms.Timer.OnTick(EventArgs e)

at System.Windows.Forms.Timer.DebuggableCallback(IntP tr hWnd, Int32 msg,
IntPtr idEvent, IntPtr dwTime)

"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Well, it would be helpful to know what the error is and the code you
used to change the font.

Sep 21 '05 #3

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

Similar topics

3
by: Cengiz Ulku | last post by:
Hi all, I know now how to change the font name of a RTF file in a RTB control using, for example: RTextBox1.SelFontName = cmbFonts.Text I have a RTF file -created with Word- displayed in a...
3
by: Val Mehling | last post by:
Up until now I have been able to avoid using Common Dialog by accessing printers directly. This is no longer possible, so- Using VB5 under XP Home Edition. I use the Common Dialog functions to...
0
by: sam | last post by:
Hi, I got problems about the charon V2 shopping cart with my asp pages (www.charon.com.hk), since my database (access) have Big5 chinese fonts, and I am hosting in a english 2000 server...
1
by: Curious Angel | last post by:
In my eternal search to locate a utility that would allow me to export PAGEMAKER documents (6.0, in this case) —> to HTML I stumbled upon this program, and was thrilled. I can do HTML, don't get...
5
by: news | last post by:
I've a site: http://gto.ie-studios.net/products.php that looks perfectly fine in Windows whether with IE or Firefox 1.0. But when viewed in the Linux version of Firefox 1.0, images get misaligned...
1
by: Jesper | last post by:
Hi, I'm experiencing some font problems. A program I've made is distributed to a number of computeres in a workgroup. On some of the computers the font on a user control is changed, (perhaps...
2
by: Nathan Guill | last post by:
Everytime I change a font (from the properties window) I get an error. I can remove the line of code VB generates and I get no errors, but I would like to be able to change fonts. Any ideas what...
8
by: traditore | last post by:
Hello. I'm trying to load fonts in a web page using "style" tag. The TTF files are in other page whose URL is, for example, "http://myURL/fonts". The HTML code is something like: <html>...
2
by: Sonnich | last post by:
hi all! I use ezPDF like this $pdf = new Cezpdf('a4','potrait'); $tmp = array( 'b'=>'Courier-Bold.AFM', 'i'=>'Courier-Oblique.AFM', 'bi'=>'Courier-BoldOblique.AFM',
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.