A co-worker came to me with this problem, and I am completely stumped. The scenario is this:
- Create a brand new VB.Net Windows Application
- Drag a control (ex: ComboBox) onto the form
- Run the application
- Watch it crash and burn (figuratively speaking, of course)
An "ArithmeticException" error is thrown upon running the application locally. What's odd is that the crash happens in the Visual Studio managed code generation area after the control is dragged onto the form. I cannot reproduce this on my machine (nor am I interested in mucking up my Visual Studio settings to cause this error).
Below is the auto-generated code, and also the text of the message box with the error details:
MessageBox text:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Create a brand new VB.Net Windows Application
- Drag a control (ex: ComboBox) onto the form
- Run the application
- Watch it crash and burn (figuratively speaking, of course)
An "ArithmeticException" error is thrown upon running the application locally. What's odd is that the crash happens in the Visual Studio managed code generation area after the control is dragged onto the form. I cannot reproduce this on my machine (nor am I interested in mucking up my Visual Studio settings to cause this error).
Below is the auto-generated code, and also the text of the message box with the error details:
Code:
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.SuspendLayout()
'
'ComboBox1
'
Me.ComboBox1.Location = New System.Drawing.Point(56, 144)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(88, 21)
Me.ComboBox1.TabIndex = 0
Me.ComboBox1.Text = "ComboBox1"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.ComboBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~