How To Create A New Form In Existing Project In C# Windows Application – Visual Studio 2010

How To Create A New Form In Existing Project In C# Windows Application – Visual Studio 2010

This Tutorial Shows How To Create A New Form In Existing Project In C# Windows Application Using Visual Studio 2010

To add a new form to existing project follow these steps:

Step 1. Go To Solution Explorer.
Step 2. Right Click On The Project.
Step 3. Hover On Add.
Step 4. Select New Item Option.

How To Create A New Form In Existing Project In C# Windows Application
How To Create A New Form In Existing Project In C# Windows Application


Step 5. On New Item Window Select “Windows Form”.
Step 6. Enter Name And Click Add.

How To Create A New Form In Existing Project In C# Windows Application
How To Create A New Form In Existing Project In C# Windows Application

C# SOURCE CODE 1

namespace AddDeleteUpdateGUICSharp
{
    partial class ViewSelectedDatagridviewRow
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (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.SuspendLayout();
            // 
            // ViewSelectedDatagridviewRow
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(458, 295);
            this.Name = "ViewSelectedDatagridviewRow";
            this.Text = "ViewSelectedDatagridviewRow";
            this.ResumeLayout(false);

        }

        #endregion
    }
}

C# SOURCE CODE 2

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AddDeleteUpdateGUICSharp
{
public partial class ViewSelectedDatagridviewRow : Form
{
public ViewSelectedDatagridviewRow()
{
InitializeComponent();
}
}
}
READ MORE  How to Move Selected Code Up or Down in Visual Studio 2010

Leave a Reply

Your email address will not be published. Required fields are marked *