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

Another NullReference Question

This code has been working for some months - suddenly it get a NullReference
error

Private Sub btnShowProj_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnShowProj.Click
Dim frmShowProject As New frmProjectEdit
... a bunch of code ...
frmShowProject.ShowDialog()
... a bunch of code ...

error is on the showdialog line.

frmProjectEdit exists

I don't know if it's related but lately I've had errors with unregistered
wrapper assemblies for microsoft libraries

TIA for any replies
Nov 22 '05 #1
2 1284
Double check all the code that is executing during the construction of
frmShowProject. Just use the debugger and step in on the line:

Dim frmShowProject As New frmProjectEdit

"Taras" wrote:
This code has been working for some months - suddenly it get a NullReference
error

Private Sub btnShowProj_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnShowProj.Click
Dim frmShowProject As New frmProjectEdit
... a bunch of code ...
frmShowProject.ShowDialog()
... a bunch of code ...

error is on the showdialog line.

frmProjectEdit exists

I don't know if it's related but lately I've had errors with unregistered
wrapper assemblies for microsoft libraries

TIA for any replies

Nov 22 '05 #2
The code executes "Public Sub New()" in "Public Class frmProjectEdit"
New() is in " Windows Form Designer generated code " .
New() contains only the auto generated code
There is no reference to frmShowProject in the intervening code

Again, this was working fine for quite some time until last Friday. There
was not changes made to frmProjectEdit at that time

"Alex Korchemniy" wrote:
Double check all the code that is executing during the construction of
frmShowProject. Just use the debugger and step in on the line:

Dim frmShowProject As New frmProjectEdit

"Taras" wrote:
This code has been working for some months - suddenly it get a NullReference
error

Private Sub btnShowProj_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnShowProj.Click
Dim frmShowProject As New frmProjectEdit
... a bunch of code ...
frmShowProject.ShowDialog()
... a bunch of code ...

error is on the showdialog line.

frmProjectEdit exists

I don't know if it's related but lately I've had errors with unregistered
wrapper assemblies for microsoft libraries

TIA for any replies

Nov 22 '05 #3

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

Similar topics

2
by: Taras | last post by:
This code has been working for some months - suddenly it get a NullReference error Private Sub btnShowProj_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShowProj.Click...
2
by: Larry Re | last post by:
I've written a small C# app which appears to work perfectly except for the fact that I get a NullReference exception when I close the form using the red 'X' in the upper right hand corner of the...
3
by: Tom | last post by:
Hi, I built a class project (classproject.dll) and a web project (webproject.dll). The web project needs to reference to that class project. They can compile without error. But, it has...
7
by: David | last post by:
Hi, I am having trouble with a form that I have loaded trying to access a procedure on the main form. The trouble seems to be that a Global Array that is declare in a Module is producing a...
5
by: Paul Cheetham | last post by:
Hi, I have moved a fairly large project from VS2003 to VS2005, and now trying to get it running. It now compiles OK after minimal changes, but I am now getting a NullReference Exception on...
0
by: studio60podcast | last post by:
I'm defining the ItemUpdating event for a DetailsView control, but when I try to access the e.NewValues collection, it's throwing a NULLReference exception. Any thoughts? <asp:DetailsView...
1
by: Rama Jayapal | last post by:
i have written the following code to call a method in a class like in the aspx.cs page List<string> surls = new List<string>(); Cweb.GetMainUrls(document,ref surls); Response.Write(surls); ...
4
by: yogarajan | last post by:
hi i had developed pop3 Account mail view in my web page but i got error in (System.NullReference Exception: Object reference not set) NetStrm.Write(szData, 0, szData.Length); - this line ...
0
by: =?Utf-8?B?RGlzcEV2ZW50QWR2aXNlIGZhaWxzIHdpdGggMHg4 | last post by:
Hi, I have a beginner's question and I'm not even sure whether it's an asp question, an Exchange server question or an x64 question... I've been experimenting with HttpModules. I want to use one in...
6
by: Steve | last post by:
Hi All I have a windows forms Application (SAM) in vb.net 2008 using .net framework V2 One and only one customer out of 30 customers is getting errors daily where they have to close and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.