473,441 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

vb.net, system.Nullreferenceexception in mscorlib.dll

Hi,
I need an urgent help.
I am developing a windows application in vb.net, using arcobjects.
I am getting an error when i am exiting the application.
I am using "End" to exit the application, but i am getting an error as:
"An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll"
Additional information: Object reference not set to an instance of an
object.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

MsgBox(" Thank you ", MsgBoxStyle.OKOnly)

End

End Sub

Nov 23 '05 #1
5 3586
CT
I'm not usrw hy you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
<ra***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,
I need an urgent help.
I am developing a windows application in vb.net, using arcobjects.
I am getting an error when i am exiting the application.
I am using "End" to exit the application, but i am getting an error as:
"An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll"
Additional information: Object reference not set to an instance of an
object.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

MsgBox(" Thank you ", MsgBoxStyle.OKOnly)

End

End Sub

Nov 23 '05 #2
CT
Okay, so I can't type; here's what the post should look like ;-):

I'm not sure why you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
I'm not usrw hy you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work
but they try anyway, and which sometimes actually work, such as
recompiling everything. (Karl Lehenbauer)
---------
<ra***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,
I need an urgent help.
I am developing a windows application in vb.net, using arcobjects.
I am getting an error when i am exiting the application.
I am using "End" to exit the application, but i am getting an error as:
"An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll"
Additional information: Object reference not set to an instance of an
object.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

MsgBox(" Thank you ", MsgBoxStyle.OKOnly)

End

End Sub


Nov 23 '05 #3
Nice signature ;-)

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"CT" <ca******@spammersgoawayintegrasol.dk> schreef in bericht
news:uP**************@tk2msftngp13.phx.gbl...
Okay, so I can't type; here's what the post should look like ;-):

I'm not sure why you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
I'm not usrw hy you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work
but they try anyway, and which sometimes actually work, such as
recompiling everything. (Karl Lehenbauer)
---------
<ra***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,
I need an urgent help.
I am developing a windows application in vb.net, using arcobjects.
I am getting an error when i am exiting the application.
I am using "End" to exit the application, but i am getting an error as:
"An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll"
Additional information: Object reference not set to an instance of an
object.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

MsgBox(" Thank you ", MsgBoxStyle.OKOnly)

End

End Sub



Nov 23 '05 #4
CT
Yeah, isn't it? :-)

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Nice signature ;-)

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"CT" <ca******@spammersgoawayintegrasol.dk> schreef in bericht
news:uP**************@tk2msftngp13.phx.gbl...
Okay, so I can't type; here's what the post should look like ;-):

I'm not sure why you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work

but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
> I'm not usrw hy you use End, but have you tried using Me.Close instead
> (assuming you only have the one form open)?
>
> --
> Carsten Thomsen
> Communities - http://community.integratedsolutions.dk
> ---------
> Voodoo Programming: Things programmers do that they know shouldn't work
> but they try anyway, and which sometimes actually work, such as
> recompiling everything. (Karl Lehenbauer)
> ---------
> <ra***********@gmail.com> wrote in message
> news:11**********************@o13g2000cwo.googlegr oups.com...
>> Hi,
>> I need an urgent help.
>> I am developing a windows application in vb.net, using arcobjects.
>> I am getting an error when i am exiting the application.
>> I am using "End" to exit the application, but i am getting an error
>> as:
>>
>>
>> "An unhandled exception of type 'System.NullReferenceException'
>> occurred in mscorlib.dll"
>> Additional information: Object reference not set to an instance of an
>> object.
>>
>> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles Button2.Click
>>
>> MsgBox(" Thank you ", MsgBoxStyle.OKOnly)
>>
>> End
>>
>> End Sub
>>
>
>



Nov 23 '05 #5
It sure is :-)

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)
"CT" <ca******@spammersgoawayintegrasol.dk> schreef in bericht
news:Od**************@TK2MSFTNGP11.phx.gbl...
Yeah, isn't it? :-)

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Nice signature ;-)

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"CT" <ca******@spammersgoawayintegrasol.dk> schreef in bericht
news:uP**************@tk2msftngp13.phx.gbl...
Okay, so I can't type; here's what the post should look like ;-):

I'm not sure why you use End, but have you tried using Me.Close instead (assuming you only have the one form open)?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work

but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
> I'm not usrw hy you use End, but have you tried using Me.Close instead > (assuming you only have the one form open)?
>
> --
> Carsten Thomsen
> Communities - http://community.integratedsolutions.dk
> ---------
> Voodoo Programming: Things programmers do that they know shouldn't work > but they try anyway, and which sometimes actually work, such as
> recompiling everything. (Karl Lehenbauer)
> ---------
> <ra***********@gmail.com> wrote in message
> news:11**********************@o13g2000cwo.googlegr oups.com...
>> Hi,
>> I need an urgent help.
>> I am developing a windows application in vb.net, using arcobjects.
>> I am getting an error when i am exiting the application.
>> I am using "End" to exit the application, but i am getting an error
>> as:
>>
>>
>> "An unhandled exception of type 'System.NullReferenceException'
>> occurred in mscorlib.dll"
>> Additional information: Object reference not set to an instance of an >> object.
>>
>> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles Button2.Click
>>
>> MsgBox(" Thank you ", MsgBoxStyle.OKOnly)
>>
>> End
>>
>> End Sub
>>
>
>



Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in...
4
by: audipen | last post by:
I have a problem with System.Type.GetType method. If you try out the following code in C# console app .. System.Type t = System.Type.GetType("System.DateTime"); System.Type t1 =...
2
by: Raed Sawalha | last post by:
i have a windows form(Main) with listview, when click an item in listview i open other window form (Sub) which generate the selected item from parent window in as treeview items when click any item...
1
by: msnews.microsoft.com | last post by:
I'm trying to fill an array of objects but when I add the first object I get a NullReferenceException. ----------------------------------------------------------------------------...
6
by: William Mild | last post by:
I must be getting brain fried. I can't see the error. Create a new web form with the following code begind: Public Class test Inherits System.Web.UI.Page Public Class ReportCardData ...
0
by: Raja B | last post by:
I start getting this exception when I moved my windows service to a Windows 2003 (32 bit running on AMD Opteron processors) server with ..NET framework 2.0 . The EventLog says Event Type: ...
3
by: Carl | last post by:
Hi. I have my program written as a console application in C# .NET 2005. I run it from a server on the local intranet and I got this message: An unhandled exception of type...
7
by: Zytan | last post by:
I just got the strangest error. I have exception code that catches a null reference exception: catch (NullReferenceException ex) { ... } The handling code does nothing but print out data from...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.