G
Guest
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 system.windows.forms.dll. Additional information: Object reference not set to an instance of an object.
Visual Studio's IDE is not allowing me to develop projects in C#... I've trying to create a simple Windows Forms project using Visual Studio.NET 2003 Enterprise Developer, and to code it using C#
As soon as I press F5, the exception is produced. Notice that I haven't placed any control on the form yet. And I haven't code anything. The only code that exists is the code-behind generated by Visual Studio
To be more precise, I'll describe the steps I've been performing
1) Select File>New>Project from Visual Studio IDE
2) Select C# as the language of preferenc
3) Select Windows Application
4) Click OK on the dialog form
5) Once the default window and code is generated..
6) Press F5
As it can be seen from the mentioned steps, I haven't coded anything neither inserted any control on the form. Just tried to run an empty Form, using the IDE's generated code. Of course, if any control is added to the form or something is coded, the exception is also produced
I'm tring to say that the exception is been produced by the code-behind generated. Not by anything added by me, since I haven't added anything
I'm pasting the code-behind in the following paragraphs to make it easy to see.
I would much appreciate any guide, help or suggestion to resolve this problem
=== Begining of cod
using System
using System.Drawing
using System.Collections
using System.ComponentModel
using System.Windows.Forms
using System.Data
namespace WindowsApplication1
/// <summary
/// Summary description for Form1
/// </summary
public class Form1 : System.Windows.Forms.For
/// <summary
/// Required designer variable
/// </summary
private System.ComponentModel.Container components = null
public Form1(
/
// Required for Windows Form Designer suppor
/
InitializeComponent()
/
// TODO: Add any constructor code after InitializeComponent cal
/
/// <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 cod
/// <summary
/// Required method for Designer support - do not modif
/// the contents of this method with the code editor
/// </summary
private void InitializeComponent(
this.components = new System.ComponentModel.Container()
this.Size = new System.Drawing.Size(300,300)
this.Text = "Form1"
#endregio
/// <summary
/// The main entry point for the application
/// </summary
[STAThread
static void Main()
Application.Run(new Form1())
==== End of cod
Thank you very much in advance for your help.
IDE: Visual Studio.NET 2003 Developer Editio
Language: C#
Problem: "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.
Visual Studio's IDE is not allowing me to develop projects in C#... I've trying to create a simple Windows Forms project using Visual Studio.NET 2003 Enterprise Developer, and to code it using C#
As soon as I press F5, the exception is produced. Notice that I haven't placed any control on the form yet. And I haven't code anything. The only code that exists is the code-behind generated by Visual Studio
To be more precise, I'll describe the steps I've been performing
1) Select File>New>Project from Visual Studio IDE
2) Select C# as the language of preferenc
3) Select Windows Application
4) Click OK on the dialog form
5) Once the default window and code is generated..
6) Press F5
As it can be seen from the mentioned steps, I haven't coded anything neither inserted any control on the form. Just tried to run an empty Form, using the IDE's generated code. Of course, if any control is added to the form or something is coded, the exception is also produced
I'm tring to say that the exception is been produced by the code-behind generated. Not by anything added by me, since I haven't added anything
I'm pasting the code-behind in the following paragraphs to make it easy to see.
I would much appreciate any guide, help or suggestion to resolve this problem
=== Begining of cod
using System
using System.Drawing
using System.Collections
using System.ComponentModel
using System.Windows.Forms
using System.Data
namespace WindowsApplication1
/// <summary
/// Summary description for Form1
/// </summary
public class Form1 : System.Windows.Forms.For
/// <summary
/// Required designer variable
/// </summary
private System.ComponentModel.Container components = null
public Form1(
/
// Required for Windows Form Designer suppor
/
InitializeComponent()
/
// TODO: Add any constructor code after InitializeComponent cal
/
/// <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 cod
/// <summary
/// Required method for Designer support - do not modif
/// the contents of this method with the code editor
/// </summary
private void InitializeComponent(
this.components = new System.ComponentModel.Container()
this.Size = new System.Drawing.Size(300,300)
this.Text = "Form1"
#endregio
/// <summary
/// The main entry point for the application
/// </summary
[STAThread
static void Main()
Application.Run(new Form1())
==== End of cod
Thank you very much in advance for your help.