473,396 Members | 1,784 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,396 software developers and data experts.

An unhandled exception of type 'System.NullReferenceException' occurred

Hi this is chandu,

can some help me out in this regard?

I had created an Active X dll.

I had registered it into the folder from where I want it to make it as .Net dll.

I had used the command as

tlbimp PhysServer.dll /out:NETPhysServer.dll
from the .net cmd prompt.

Now I had written the code in vb.net as below to access this dll

Private WithEvents moTemp As NETPhysServer.Temperature

Private Sub cmdConvertToC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConvertToC.Click
lblBelowFreezing.Visible = False
lblAboveBoiling.Visible = False
With moTemp
.Fahrenheit = txtFahrenheit.Text
txtCelsius.Text = .GetCelsius
End With
End Sub

Private Sub cmdConvertToF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConvertToF.Click
lblBelowFreezing.Visible = False
lblAboveBoiling.Visible = False
With moTemp
.Celsius = txtCelsius.Text
txtFahrenheit.Text = .GetFahrenheit
End With
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' moTemp = New NETPhysServer.Temperature
End Sub

Private Sub moTemp_AboveBoiling() Handles moTemp.AboveBoiling
lblAboveBoiling.Visible = True
End Sub

Private Sub moTemp_BelowFreezing() Handles moTemp.BelowFreezing
lblBelowFreezing.Visible = True
End Sub


When I try to debug this code I am getting an erro saying
"An unhandled exception of type 'System.NullReferenceException' occurred "

Please help me out to figure out this
Jan 8 '07 #1
2 1969
Niheel
2,460 Expert Mod 2GB
Discussion moved to .net forum.
Jan 8 '07 #2
bplacker
121 100+
do you know which line the error occured on?
Jan 8 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rafael | last post by:
Hi, I hope I can find some help for this problem IDE: Visual Studio.NET 2003 Developer Editio Language: C# Problem: "An unhandled exception of type 'System.NullReferenceException' occurred in...
0
by: Rafiq Ganaie via .NET 247 | last post by:
HI, I am working on a search application in C#.It is a multithreaded application.it simply takes a URL,Downloads the page using WebRequest and WebResponse classes.Unfortunately it is throwing...
3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
3
by: cristiank | last post by:
hi everybody, I need to clear something out, does anybody have ever encountered such an exception until now : "Un unhandled exception of type System.NullReferenceException occurred in...
3
by: juli | last post by:
Hello! I keep getting this error: An unhandled exception of type 'System.NullReferenceException' occurred Additional information: Object reference not set to an instance of an object. I am...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
1
by: mike | last post by:
My program is crashing, but it doesn't crash on a single line of code. Below is what the output tab displays. I have no idea where to start inorder to debug this problem. Is there any suggesstions...
9
by: Supra | last post by:
i got error problem.......... An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll Additional information: Object reference not set to an instance of...
1
by: Pedro Dinis | last post by:
i have this class library that connects to the database(see appconfig below) compiling 0 errors but when its running i amhaving this error An unhandled exception of type...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...

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.