473,490 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

System.NullReferenceException

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
system.windows.forms.dll

I am sure this is a simple fix, but I cannot find a answer.

Terrence
Jul 19 '05 #1
3 9085
Can you post the rest of your code? Without it, it's difficult to tell
what's going on....

Thanks,
- bliz
--
Jim Blizzard
Sr .NET Developer Evangelist
Microsoft

Your Potential. Our Passion.

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only, so that others may benefit. Thanks.
--------------------
Content-Class: urn:content-classes:message
From: "Terrence" <tr********@hotmail.com>
Sender: "Terrence" <tr********@hotmail.com>
Subject: System.NullReferenceException
Date: Wed, 2 Jul 2003 20:14:49 -0700
Lines: 14
Message-ID: <08****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNBEUNX0JWNsBAcSKah7zscfgzN3g==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa09.phx.gbl
Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.general:14499
NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.general

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
system.windows.forms.dll

I am sure this is a simple fix, but I cannot find a answer.

Terrence


Jul 19 '05 #2
Thanks for posting the code. It appears as though there's a bug in the
InitializeComponent method. You may want to take a look at the book
publisher's or author's web site to see if there's some erratta information
with corrections to the code.

Unfortunately I can't tell what's going on without even more information
regarding external references to things such as
AuthorsWinClient.localhost.authors1

Good luck!
-bliz

--
Jim Blizzard
Sr .NET Developer Evangelist
Microsoft

Your Potential. Our Passion.

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only, so that others may benefit. Thanks.
--------------------
Content-Class: urn:content-classes:message
From: "Terrence" <tr********@hotmail.com>
Sender: "Terrence" <tr********@hotmail.com>
References: <08****************************@phx.gbl> <zH*************@cpmsftngxa09.phx.gbl>Subject: RE: System.NullReferenceException
Date: Thu, 3 Jul 2003 07:10:32 -0700
Lines: 319
Message-ID: <0c****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNBbN3Ax2+BDkEpRLCp7Qep1YyJAw==
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa09.phx.gbl
Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.general:14548
NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
X-Tomcat-NG: microsoft.public.dotnet.general

Here is the code; I will mark the line where the execution
stops with <====

Also, I have included the contents of the Debug window
following the code.
============================ CODE ======================
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace AuthorsWinClient
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class frmMain : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid
dataGrid1;
private System.Windows.Forms.Button
SaveData;
private System.Windows.Forms.Button
LoadData;
private
AuthorsWinClient.localhost.authors1 AuthorData;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container
components = null;

public frmMain()
{
//
// Required for Windows Form
Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code
after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool
disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose
();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated
code
/// <summary>
/// Required method for Designer support -
do not modify
/// the contents of this method with the
code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGrid1 = new
System.Windows.Forms.DataGrid();
this.AuthorData = new
AuthorsWinClient.localhost.authors1();
this.SaveData = new
System.Windows.Forms.Button();
this.LoadData = new
System.Windows.Forms.Button();

((System.ComponentModel.ISupportInitialize)
(this.dataGrid1)).BeginInit();

((System.ComponentModel.ISupportInitialize)
(this.AuthorData)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember
= "authors";
this.dataGrid1.DataSource =
this.AuthorData;
this.dataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new
System.Drawing.Point(8, 8);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new
System.Drawing.Size(344, 184);
this.dataGrid1.TabIndex = 0;
//
// AuthorData
//
this.AuthorData.DataSetName
= "authors1";
this.AuthorData.Locale = new
System.Globalization.CultureInfo("en-US");
//
// SaveData
//
this.SaveData.Location = new
System.Drawing.Point(216, 208);
this.SaveData.Name = "SaveData";
this.SaveData.Size = new
System.Drawing.Size(96, 24);
this.SaveData.TabIndex = 1;
this.SaveData.Text = "Save";
this.SaveData.Click += new
System.EventHandler(this.SaveData_Click);
//
// LoadData
//
this.LoadData.Location = new
System.Drawing.Point(40, 208);
this.LoadData.Name = "LoadData";
this.LoadData.Size = new
System.Drawing.Size(80, 24);
this.LoadData.TabIndex = 2;
this.LoadData.Text = "Load";
this.LoadData.Click += new
System.EventHandler(this.LoadData_Click);
//
// frmMain
//
this.AutoScaleBaseSize = new
System.Drawing.Size(5, 13);
this.ClientSize = new
System.Drawing.Size(360, 245);
this.Controls.Add(this.LoadData);
this.Controls.Add(this.SaveData);
this.Controls.Add(this.dataGrid1);
this.Name = "frmMain";
this.Text = "Form Main";

((System.ComponentModel.ISupportInitialize)
(this.dataGrid1)).EndInit();

((System.ComponentModel.ISupportInitialize)
(this.AuthorData)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the
application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new frmMain());
} <==== Exception Thrown

private void LoadData_Click(object sender,
System.EventArgs e)
{

AuthorsWinClient.localhost.AuthorsService ws =
new
AuthorsWinClient.localhost.AuthorsService();
ws.Credentials =
System.Net.CredentialCache.DefaultCredentials;
AuthorData.Merge(ws.GetAuthors());
}

private void SaveData_Click(object sender,
System.EventArgs e)
{

AuthorsWinClient.localhost.AuthorsService ws =
new
AuthorsWinClient.localhost.AuthorsService();
ws.Credentials =
System.Net.CredentialCache.DefaultCredentials;

AuthorsWinClient.localhost.authors1 diffAuthors =
new
AuthorsWinClient.localhost.authors1();
diffAuthors.Merge
(AuthorData.GetChanges());
diffAuthors = ws.UpdateAuthors
(diffAuthors);
AuthorData.Merge(diffAuthors);
}
}
}
======================= DEBUG ==========================
'DefaultDomain':
Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322
\mscorlib.dll', No symbols loaded.
'AuthorsWinClient': Loaded 'C:\Documents and
Settings\tdaniel\My Documents\Visual Studio
Projects\AuthorWebService\AuthorsWinClient\bin\De bug\Author
sWinClient.exe', Symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.windows.forms\1.0.50 00
.0__b77a5c561934e089\system.windows.forms.dll', No symbols
loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c56 19
34e089\system.dll', No symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.drawing\1.0.5000.0__ b0
3f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.data\1.0.5000.0__b77 a5
c561934e089\system.data.dll', No symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a 5c
561934e089\system.xml.dll', No symbols loaded.
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.
Unhandled Exception: System.NullReferenceException: Object
reference not set to an instance of an object.
at System.Windows.Forms.SafeNativeMethods.ShowWindow
(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolea n
value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean
value)
at System.Windows.Forms.Control.set_Visible(Boolean
value)
at
System.Windows.Forms.ThreadContext.RunMessageLoop Inner
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AuthorsWinClient.frmMain.Main() in c:\documents and
settings\tdaniel\my documents\visual studio
projects\authorwebservice\authorswinclient\form1. cs:line
121The program '[3084] AuthorsWinClient.exe' has exited
with code 0 (0x0).

-----Original Message-----
Can you post the rest of your code? Without it, it's

difficult to tell
what's going on....

Thanks,
- bliz
--
Jim Blizzard
Sr .NET Developer Evangelist
Microsoft

Your Potential. Our Passion.

This posting is provided "AS IS" with no warranties, and

confers no rights.
Please reply to newsgroups only, so that others may

benefit. Thanks.


--------------------
Content-Class: urn:content-classes:message
From: "Terrence" <tr********@hotmail.com>
Sender: "Terrence" <tr********@hotmail.com>
Subject: System.NullReferenceException
Date: Wed, 2 Jul 2003 20:14:49 -0700
Lines: 14
Message-ID: <08****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNBEUNX0JWNsBAcSKah7zscfgzN3g==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa09.phx.gbl
Xref: cpmsftngxa09.phx.gblmicrosoft.public.dotnet.general:14499NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.general

I am doing some of the C# walkthroughs to transitionfromVB to C#. When I try to execute

static void Main()
{
Aplication.Run(new Form1())
}

I raise a 'System.NullReferenceException" in
system.windows.forms.dll

I am sure this is a simple fix, but I cannot find aanswer.
Terrence


.


Jul 19 '05 #3
Let me take a look at the sample app.

Thanks,
- bliz
--
Jim Blizzard
Sr .NET Developer Evangelist
Microsoft

Your Potential. Our Passion.

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only, so that others may benefit. Thanks.
--------------------
Content-Class: urn:content-classes:message
From: "Terrence" <tr********@hotmail.com>
Sender: "Terrence" <tr********@hotmail.com>
References: <08****************************@phx.gbl> <zH*************@cpmsftngxa09.phx.gbl>
<0c****************************@phx.gbl>
<X4**************@cpmsftngxa09.phx.gbl>Subject: RE: System.NullReferenceException
Date: Thu, 3 Jul 2003 08:01:12 -0700
Lines: 397
Message-ID: <50****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNBc/GGEtBG3tHWTS2AU6Ql41txxg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa09.phx.gbl
Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.general:14562
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.general

Jim,

This is the code from MS VS.NET 2003 documentation/C#
Walkthrough/Simple Distributed App - Typed verbatim. I
have done the same walkthrough using VS.NET (on home box)
and it ran. Any thoughts?
-----Original Message-----
Thanks for posting the code. It appears as though

there's a bug in the
InitializeComponent method. You may want to take a look

at the book
publisher's or author's web site to see if there's some

erratta information
with corrections to the code.

Unfortunately I can't tell what's going on without even

more information
regarding external references to things such as
AuthorsWinClient.localhost.authors1

Good luck!
-bliz

--
Jim Blizzard
Sr .NET Developer Evangelist
Microsoft

Your Potential. Our Passion.

This posting is provided "AS IS" with no warranties, and

confers no rights.
Please reply to newsgroups only, so that others may

benefit. Thanks.


--------------------
Content-Class: urn:content-classes:message
From: "Terrence" <tr********@hotmail.com>
Sender: "Terrence" <tr********@hotmail.com>
References: <08****************************@phx.gbl>

<zH*************@cpmsftngxa09.phx.gbl>
Subject: RE: System.NullReferenceException
Date: Thu, 3 Jul 2003 07:10:32 -0700
Lines: 319
Message-ID: <0c****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNBbN3Ax2+BDkEpRLCp7Qep1YyJAw==
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa09.phx.gbl
Xref: cpmsftngxa09.phx.gblmicrosoft.public.dotnet.general:14548NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
X-Tomcat-NG: microsoft.public.dotnet.general

Here is the code; I will mark the line where theexecutionstops with <====

Also, I have included the contents of the Debug window
following the code.
============================ CODE ======================
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace AuthorsWinClient
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class frmMain : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid
dataGrid1;
private System.Windows.Forms.Button
SaveData;
private System.Windows.Forms.Button
LoadData;
private
AuthorsWinClient.localhost.authors1 AuthorData;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container
components = null;

public frmMain()
{
//
// Required for Windows Form
Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code
after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool
disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose
();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated
code
/// <summary>
/// Required method for Designer support -
do not modify
/// the contents of this method with the
code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGrid1 = new
System.Windows.Forms.DataGrid();
this.AuthorData = new
AuthorsWinClient.localhost.authors1();
this.SaveData = new
System.Windows.Forms.Button();
this.LoadData = new
System.Windows.Forms.Button();

((System.ComponentModel.ISupportInitialize)
(this.dataGrid1)).BeginInit();

((System.ComponentModel.ISupportInitialize)
(this.AuthorData)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember
= "authors";
this.dataGrid1.DataSource =
this.AuthorData;
this.dataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new
System.Drawing.Point(8, 8);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new
System.Drawing.Size(344, 184);
this.dataGrid1.TabIndex = 0;
//
// AuthorData
//
this.AuthorData.DataSetName
= "authors1";
this.AuthorData.Locale = new
System.Globalization.CultureInfo("en-US");
//
// SaveData
//
this.SaveData.Location = new
System.Drawing.Point(216, 208);
this.SaveData.Name = "SaveData";
this.SaveData.Size = new
System.Drawing.Size(96, 24);
this.SaveData.TabIndex = 1;
this.SaveData.Text = "Save";
this.SaveData.Click += new
System.EventHandler(this.SaveData_Click);
//
// LoadData
//
this.LoadData.Location = new
System.Drawing.Point(40, 208);
this.LoadData.Name = "LoadData";
this.LoadData.Size = new
System.Drawing.Size(80, 24);
this.LoadData.TabIndex = 2;
this.LoadData.Text = "Load";
this.LoadData.Click += new
System.EventHandler(this.LoadData_Click);
//
// frmMain
//
this.AutoScaleBaseSize = new
System.Drawing.Size(5, 13);
this.ClientSize = new
System.Drawing.Size(360, 245);
this.Controls.Add(this.LoadData);
this.Controls.Add(this.SaveData);
this.Controls.Add(this.dataGrid1);
this.Name = "frmMain";
this.Text = "Form Main";

((System.ComponentModel.ISupportInitialize)
(this.dataGrid1)).EndInit();

((System.ComponentModel.ISupportInitialize)
(this.AuthorData)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the
application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new frmMain());
} <==== Exception Thrown

private void LoadData_Click(object sender,
System.EventArgs e)
{

AuthorsWinClient.localhost.AuthorsService ws =
new
AuthorsWinClient.localhost.AuthorsService();
ws.Credentials =
System.Net.CredentialCache.DefaultCredentials ;
AuthorData.Merge(ws.GetAuthors());
}

private void SaveData_Click(object sender,
System.EventArgs e)
{

AuthorsWinClient.localhost.AuthorsService ws =
new
AuthorsWinClient.localhost.AuthorsService();
ws.Credentials =
System.Net.CredentialCache.DefaultCredentials ;

AuthorsWinClient.localhost.authors1 diffAuthors =
new
AuthorsWinClient.localhost.authors1();
diffAuthors.Merge
(AuthorData.GetChanges());
diffAuthors = ws.UpdateAuthors
(diffAuthors);
AuthorData.Merge(diffAuthors);
}
}
}
======================= DEBUG ==========================
'DefaultDomain':
Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322
\mscorlib.dll', No symbols loaded.
'AuthorsWinClient': Loaded 'C:\Documents and
Settings\tdaniel\My Documents\Visual Studio
Projects\AuthorWebService\AuthorsWinClient\bin\ Debug\AuthorsWinClient.exe', Symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll ', Nosymbolsloaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll', No symbols loaded.
'AuthorsWinClient.exe':
Loaded 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded.
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.
Unhandled Exception: System.NullReferenceException:Objectreference not set to an instance of an object.
at System.Windows.Forms.SafeNativeMethods.ShowWindow
(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Booleanvalue)
at System.Windows.Forms.Form.SetVisibleCore(Boolean
value)
at System.Windows.Forms.Control.set_Visible(Boolean
value)
at
System.Windows.Forms.ThreadContext.RunMessageLo opInner
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AuthorsWinClient.frmMain.Main() in c:\documentsandsettings\tdaniel\my documents\visual studio
projects\authorwebservice\authorswinclient\form 1.cs:line
121The program '[3084] AuthorsWinClient.exe' has exited
with code 0 (0x0).
-----Original Message-----
Can you post the rest of your code? Without it, it's
difficult to tell
what's going on....

Thanks,
- bliz
--
Jim Blizzard
Sr .NET Developer Evangelist
Microsoft

Your Potential. Our Passion.

This posting is provided "AS IS" with no warranties,andconfers no rights.
Please reply to newsgroups only, so that others may
benefit. Thanks.
--------------------
>Content-Class: urn:content-classes:message
>From: "Terrence" <tr********@hotmail.com>
>Sender: "Terrence" <tr********@hotmail.com>
>Subject: System.NullReferenceException
>Date: Wed, 2 Jul 2003 20:14:49 -0700
>Lines: 14
>Message-ID: <08****************************@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcNBEUNX0JWNsBAcSKah7zscfgzN3g==
>X-MimeOLE: Produced By Microsoft MimeOLEV5.50.4910.0300>Newsgroups: microsoft.public.dotnet.general
>Path: cpmsftngxa09.phx.gbl
>Xref: cpmsftngxa09.phx.gbl
microsoft.public.dotnet.general:14499
>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>X-Tomcat-NG: microsoft.public.dotnet.general
>
>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
>system.windows.forms.dll
>
>I am sure this is a simple fix, but I cannot find a
answer.
>
>Terrence
>

.


.


Jul 19 '05 #4

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

Similar topics

1
536
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...
3
397
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...
0
9740
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
0
2677
by: Matthias Kwiedor | last post by:
Hi! I want to create a WebBrowser Control at runtime. So i ported the "at start creation" of the Control to a new routine. Everything works fine, but i implement the BeforeNavigateFix and a...
2
7774
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
4080
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. ----------------------------------------------------------------------------...
2
2720
by: sxiao | last post by:
Hi, there I got a NullReferenceException when there are more than one users trying to open the same page at the same time. The senerio is: Two users logged into the web application using the...
6
22195
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 ...
3
3638
by: Alex J. | last post by:
I just started to learn C# (my background is in C++), and right now I study the sockets, TCP/IP etc... so, I found a usefull source code at:...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7142
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
7352
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
5445
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
3078
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
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.