473,320 Members | 2,146 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,320 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 1791
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.