By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,992 Members | 934 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,992 IT Pros & Developers. It's quick & easy.

Print Create Font Exception help me !

P: n/a
In Print Process,I use the code,but it is not run
correctly On WINDOWS 98 .
I didn't know why ...?

this.Font = new System.Drawing.Font("宋体", 10.5F,
System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
.....
graphics.DrawString(strtmp,this.Font,this.brushBla ck,
DrawStringValidRect(ref ,graphics,this.Font ,
new Rectangle(x,y,width,height),alignmenttmp));

the error info is following:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** 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..ctor(String familyName, Single
emSize, FontStyle style, GraphicsUnit unit, Byte
gdiCharSet)
at winelt.mainForm.initlistviewmeas()
at winelt.mainForm.treeViewcard_AfterSelect(Object
sender, TreeViewEventArgs e)
at System.Windows.Forms.TreeView.OnAfterSelect
(TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected
(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage
(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc
(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorl
ib.dll
----------------------------------------
winelt
Assembly Version: 1.0.1411.28591
Win32 Version: 1.0.1411.28591
CodeBase: file:///D:/K100TEST/WINELT.EXE
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.50
00.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c56
1934e089/system.dll
----------------------------------------
TS_DataBase
Assembly Version: 1.0.1411.28519
Win32 Version: 1.0.1411.28519
CodeBase: file:///D:/K100TEST/TS_DataBase.DLL
----------------------------------------
CSockshow
Assembly Version: 1.0.1411.28521
Win32 Version: 1.0.1411.28521
CodeBase: file:///D:/K100TEST/CSockshow.DLL
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__
b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
CSensor
Assembly Version: 1.0.1411.28520
Win32 Version: 1.0.1411.28520
CodeBase: file:///D:/K100TEST/CSensor.DLL
----------------------------------------
measReportForm
Assembly Version: 1.0.1411.28590
Win32 Version: 1.0.1411.28590
CodeBase: file:///D:/K100TEST/measReportForm.DLL
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file
for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.