Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

Unhandled Exception Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shariq - 21 Dec 2004 22:13 GMT
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?????????

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.