Unhandled Exception Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using vb.net (VS 2003) on an XP and get the following error message:
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an object.

on the following sub (The line with ***)

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

All I am trying to do is to close a form using the following code:

LVLabelApp.LblApp.Quit()
LVLabelApp.LblApp = Nothing
Me.Close()


Please help?????????
 
Shariq said:
I am using vb.net (VS 2003) on an XP and get the following error message:
An unhandled exception of type 'System.NullReferenceException' occurred
in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.

on the following sub (The line with ***)

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

Where's the line that is marked with "***"?
 
Sorry, I forgot to add the *** to the line that errored out.
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
 
Back
Top