473,396 Members | 1,975 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.

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 1285
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...
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: 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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
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...

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.