.NET Programming
 

     
Solution for the error message The variable 'control name' is either undeclared or was never assigned

Keywords: The variable 'control name' is either undeclared or was never assigned, Converting Visual Studio 2003 project to Visual Studio 2005

 

 
 

cipramil ingredients

cipramil effekt cipramil ja sepram cipramil interactions

          1. Copy the private declares for the undeclared variables

 

      public class PurchaseOrder : BaseForm

      {

            private Panel panel1 = new Panel();

 

            private Label lblTitle = new Label();

            private Label lblQuantity = new Label();

            private Label lblProduct = new Label();

            private Label lblLocation = new Label();

 

 

      2. Expand the “Windows Form Designer Generated Code”

 

 

            #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()

            {

 

      3. Paste the Declarations at the beginning of the       

      IntializeComponent function and convert the "Private ControlType"    

      to "this".  Repeat for all of the affected controls

 

                this.panel1 = new Panel();

 

            private Label lblTitle = new Label();

            private Label lblQuantity = new Label();

            private Label lblProduct = new Label();

            private Label lblLocation = new Label();

 

            4. Close the designer tab and re-open.


 


 PTerryWave LLC      Return to Programming Listing
About