System.Drawing.Dll arithmetic exception...

Posted on 2004-11-16
Last Modified: 2010-08-05
Based on my search on the internet, I think many people have encountered this problem. But I did not find any solutions for it.

I just installed Win XP and VS.NET 2003, nothing else. When I run a form with either a textbox or listbox in it I get a System.Arithmetic.Exception error in System.Drawing on the line that sets the textbox to a new instance of TextBox class.

What do you think is the cause of this error?
Question by:mhdhallak
    LVL 24

    Expert Comment

    by:Jeff Certain
    Probably a problem in your code... can you post the code where you create the textbox?

    Expert Comment

    I have the same problem it does not code problem ...
    for me it occures in :
    me.txtNumber = new Form.Textbox .....

    What's the solution for this problem ?
    LVL 24

    Expert Comment

    by:Jeff Certain
    How is me.txtNumber declared?

    Author Comment

    I didn't write any code other the one written by the form designer!!!

    Accepted Solution


    mhdhallak : you will find the solution here:

    Thanks :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now