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

Print Create Font Exception help me !

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
0 1486

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

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
1
by: Bernalin | last post by:
The Print() method used in my vb .net 2003 program abort with a "Descripteur non valide" and i don't know why. Following the part of my code : Friend WithEvents Papier As...
0
by: hesing Qiang | last post by:
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,...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
4
by: DeWittds | last post by:
Had no luck in the visual basic group maybe someone here can give me a hand. I have been tring to recreate a simple program that I wrote many years ago in quick basic. The program get name and...
0
by: thirunavukarasukm | last post by:
Hai.... To print Html page using PrintDialog and Print Document i am created one windows appication.. the windows application have many pages in my booking page i have two buttons one...
16
by: raylopez99 | last post by:
I am running out of printing paper trying to debug this...it has to be trivial, but I cannot figure it out--can you? Why am I not printing text, but just the initial string "howdy"? On the...
2
by: =?Utf-8?B?ZnJlZGR5?= | last post by:
I am new to c# and I made a form with different controls like textbox, labals, groupboxes, radio buttons and so on... I would like to print out the text of the textbox control and not the contol...
3
by: rajkumarpb | last post by:
Hi friends, I am new to this forum...But not for programming...I want a Print CSS File to be added in my page..OK.... Here is the page and i want you friends to help me create the CSS File...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.