newby question.

D

Damien

Heu guys,

I have just built a simple stopwatch application, but when i f5 to get
things goings i get this message,


An unhandled exception of type 'System.ArithmeticException' occurred in
system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation.


can anyone help??
 
O

One Handed Man

Hi Damien,
You have caused an unhandled exception by some math
operation, such as divide by zero or something simelar. Put your code in a
try catch block to get more information.

Try
'Your code goes here

Catch ex as Exception

messagebox.show( ex.toString()

End Try

This will help you define the problem.


Regards - OHM
 
P

Phill. W

.. . .
An unhandled exception of type 'System.ArithmeticException' occurred
in system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation.
can anyone help??

Only by pure guesswork without seeing the actual code.

First guesses would be dividing by zero using integral data types
(Integers, Longs and such like) - the cleverer number types don't
display different symptoms or dodgy arguments to the Trigonometrical
functions you're using to draw your "stopwatch".

HTH,
Phill W.
 
H

Herfried K. Wagner [MVP]

* "Damien said:
I have just built a simple stopwatch application, but when i f5 to get
things goings i get this message,

An unhandled exception of type 'System.ArithmeticException' occurred in
system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation.

This error can be caused by font calculations in 'Sub
InitializeComponent'. Sorry, I don't know any fix...
 
D

Damien

this is the line that keeps getting highlighted!!

Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblElapsed,
Me.lblEnd, Me.lblStart, Me.Label3, Me.Label2, Me.Label1, Me.btnExit,
Me.btnEnd, Me.btnStart})



could any one please help??
 
O

One Handed Man

You project cant be very big, please post the code as an attachment, or past
the relevant code.


Regards - OHM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top