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?????????
Herfried K. Wagner [MVP] - 22 Dec 2004 14:19 GMT
"Shariq" <Shariq@discussions.microsoft.com> schrieb:
>I am using vb.net (VS 2003) on an XP and get the following error message:
> An unhandled exception of type 'System.NullReferenceException' occurred
[quoted text clipped - 13 lines]
> MyBase.Dispose(disposing)
> End Sub
Where's the line that is marked with "***"?

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/
Shariq - 22 Dec 2004 14:35 GMT
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
> 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
[quoted text clipped - 19 lines]
>
> Please help?????????