problems with changing fonts

  • Thread starter Thread starter Nathan Guill
  • Start date Start date
N

Nathan Guill

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.
 
Well, it would be helpful to know what the error is and the code you
used to change the font.
 
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.UltraToolbarsManager.DisplayToolTip(String
text)

at
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.DisplayToolTip(ToolBa
se tool)

at Infragistics.Win.UltraWinToolbars.ToolBase.DisplayToolTip()

at
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.set_ImmediateToolTipD
isplayMode(Boolean value)

at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseHover()

at Infragistics.Win.ControlUIElementBase.NotifyMouseHover(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(IntPtr hWnd, Int32 msg,
IntPtr idEvent, IntPtr dwTime)
 
Back
Top