problem with c# (help required)
-
Hi, I was making a very simple windows application in C#. the application runs fine when i create a new windows application but when i add a button on the form a problem occurs. Although the application compiles correctly, but when i run the application it gives an exception saying, "An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll Additional information: Overflow or underflow in the arithmetic operation." I am really confused here because i am placing the button on the form using the form designer. i have not even touched the code itself. i also tried to add the button to the form by coding myself but the same problem exists. please help me i will be really thankful. bye.
-
Hi, I was making a very simple windows application in C#. the application runs fine when i create a new windows application but when i add a button on the form a problem occurs. Although the application compiles correctly, but when i run the application it gives an exception saying, "An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll Additional information: Overflow or underflow in the arithmetic operation." I am really confused here because i am placing the button on the form using the form designer. i have not even touched the code itself. i also tried to add the button to the form by coding myself but the same problem exists. please help me i will be really thankful. bye.
Try changing your code to the following and seeing if it helps any:
[DllImport("msvcr70.dll", CallingConvention = CallingConvention.Cdecl)] public static extern int _controlfp(int n, int mask); [STAThread] static void Main() { _controlfp(_CW_DEFAULT, 0xfffff); Application.Run(new Form1()); }
-
Hi, I was making a very simple windows application in C#. the application runs fine when i create a new windows application but when i add a button on the form a problem occurs. Although the application compiles correctly, but when i run the application it gives an exception saying, "An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll Additional information: Overflow or underflow in the arithmetic operation." I am really confused here because i am placing the button on the form using the form designer. i have not even touched the code itself. i also tried to add the button to the form by coding myself but the same problem exists. please help me i will be really thankful. bye.
Something is really weird. What does the code that gets added look like ? Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder