Reputation: 2748
I am getting the error in my designer code "The designer cannot process the code at line 163, please see the Task List for details. The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again."
The task list says that it "Could not find an associated help topic for this error"
This is line 163
this.textBox_Command.TabIndex = 15;
This is the entire designer file. Ive spent hours trying to comment out each line by line but it just complains about the previous line when I do that.
***** Designer File *****
namespace Print
{
partial class Form_Print
{
/// <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.button_Print = new System.Windows.Forms.Button();
this.comboBox_Bartender_File = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.button_flush_cache = new System.Windows.Forms.Button();
this.checkBox_Show_Bartender = new System.Windows.Forms.CheckBox();
this.checkBoxPause = new System.Windows.Forms.CheckBox();
this.checkBox_FlucheCache = new System.Windows.Forms.CheckBox();
this.textBox_Log = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.textBox_Command = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.button_Check_Sensor = new System.Windows.Forms.Button();
this.rtxtRecv = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox_IP_Address = new System.Windows.Forms.TextBox();
this.checkBox_Using_Sato = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// button_Print
//
this.button_Print.Location = new System.Drawing.Point(12, 121);
this.button_Print.Name = "button_Print";
this.button_Print.Size = new System.Drawing.Size(282, 113);
this.button_Print.TabIndex = 0;
this.button_Print.Text = "Print";
this.button_Print.UseVisualStyleBackColor = true;
this.button_Print.Click += new System.EventHandler(this.Print_Click);
//
// comboBox_Bartender_File
//
this.comboBox_Bartender_File.DropDownWidth = 243;
this.comboBox_Bartender_File.FormattingEnabled = true;
this.comboBox_Bartender_File.Items.AddRange(new object[] {
"c:\\PrintingApplication\\BartenderFiles\\16353-002a.btw,SATO CL4NX 609dpi",
"c:\\PrintingApplication\\BartenderFiles\\16353-002a.btw,SATO CL4NX 609dpi"});
this.comboBox_Bartender_File.Location = new System.Drawing.Point(91, 32);
this.comboBox_Bartender_File.Name = "comboBox_Bartender_File";
this.comboBox_Bartender_File.Size = new System.Drawing.Size(191, 21);
this.comboBox_Bartender_File.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(76, 13);
this.label1.TabIndex = 2;
this.label1.Text = "BarTender File";
//
// button_flush_cache
//
this.button_flush_cache.Location = new System.Drawing.Point(727, 40);
this.button_flush_cache.Name = "button_flush_cache";
this.button_flush_cache.Size = new System.Drawing.Size(150, 51);
this.button_flush_cache.TabIndex = 5;
this.button_flush_cache.Text = "Flush Cache";
this.button_flush_cache.UseVisualStyleBackColor = true;
this.button_flush_cache.Click += new System.EventHandler(this.button_flush_cache_Click);
//
// checkBox_Show_Bartender
//
this.checkBox_Show_Bartender.AutoSize = true;
this.checkBox_Show_Bartender.Location = new System.Drawing.Point(12, 12);
this.checkBox_Show_Bartender.Name = "checkBox_Show_Bartender";
this.checkBox_Show_Bartender.Size = new System.Drawing.Size(195, 17);
this.checkBox_Show_Bartender.TabIndex = 6;
this.checkBox_Show_Bartender.Text = "Show BarTender During Processing";
this.checkBox_Show_Bartender.UseVisualStyleBackColor = true;
//
// checkBoxPause
//
this.checkBoxPause.AutoSize = true;
this.checkBoxPause.Location = new System.Drawing.Point(305, 12);
this.checkBoxPause.Name = "checkBoxPause";
this.checkBoxPause.Size = new System.Drawing.Size(165, 17);
this.checkBoxPause.TabIndex = 10;
this.checkBoxPause.Text = "Pause Printer after each label";
this.checkBoxPause.UseVisualStyleBackColor = true;
//
// checkBox_FlucheCache
//
this.checkBox_FlucheCache.AutoSize = true;
this.checkBox_FlucheCache.Location = new System.Drawing.Point(498, 12);
this.checkBox_FlucheCache.Name = "checkBox_FlucheCache";
this.checkBox_FlucheCache.Size = new System.Drawing.Size(413, 17);
this.checkBox_FlucheCache.TabIndex = 6;
this.checkBox_FlucheCache.Text = "Flush Cache between printouts of bartender files if the bartender filename change" +
"s\r\n";
this.checkBox_FlucheCache.UseVisualStyleBackColor = true;
//
// textBox_Log
//
this.textBox_Log.Location = new System.Drawing.Point(15, 322);
this.textBox_Log.Multiline = true;
this.textBox_Log.Name = "textBox_Log";
this.textBox_Log.Size = new System.Drawing.Size(872, 145);
this.textBox_Log.TabIndex = 11;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 306);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 13);
this.label2.TabIndex = 12;
this.label2.Text = "Message Log";
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.textBox_Command);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.button_Check_Sensor);
this.panel1.Controls.Add(this.rtxtRecv);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.textBox_IP_Address);
this.panel1.Controls.Add(this.checkBox_Using_Sato);
this.panel1.Location = new System.Drawing.Point(305, 121);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(582, 198);
this.panel1.TabIndex = 13;
//
// textBox_Command
//
this.textBox_Command.Location = new System.Drawing.Point(68, 92);
this.textBox_Command.Name = "textBox_Command";
this.textBox_Command.Size = new System.Drawing.Size(100, 20);
this.textBox_Command.TabIndex = 15;
this.textBox_Command.Text = "PD";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(7, 100);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(54, 13);
this.label6.TabIndex = 14;
this.label6.Text = "Command";
//
// button_Check_Sensor
//
this.button_Check_Sensor.Location = new System.Drawing.Point(375, 20);
this.button_Check_Sensor.Name = "button_Check_Sensor";
this.button_Check_Sensor.Size = new System.Drawing.Size(75, 68);
this.button_Check_Sensor.TabIndex = 13;
this.button_Check_Sensor.Text = "Check Sensor";
this.button_Check_Sensor.UseVisualStyleBackColor = true;
this.button_Check_Sensor.Click += new System.EventHandler(this.button_Check_Sensor_Click);
//
// rtxtRecv
//
this.rtxtRecv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.rtxtRecv.Location = new System.Drawing.Point(86, 131);
this.rtxtRecv.Multiline = true;
this.rtxtRecv.Name = "rtxtRecv";
this.rtxtRecv.Size = new System.Drawing.Size(482, 61);
this.rtxtRecv.TabIndex = 12;
this.rtxtRecv.Text = "Unknown";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 134);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(73, 13);
this.label5.TabIndex = 11;
this.label5.Text = "Sensor Status";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(4, 4);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(91, 13);
this.label4.TabIndex = 1;
this.label4.Text = "Printer IP Address";
//
// textBox_IP_Address
//
this.textBox_IP_Address.Location = new System.Drawing.Point(7, 20);
this.textBox_IP_Address.Name = "textBox_IP_Address";
this.textBox_IP_Address.Size = new System.Drawing.Size(307, 20);
this.textBox_IP_Address.TabIndex = 0;
this.textBox_IP_Address.Text = "10.162.21.11";
//
// checkBox_Using_Sato
//
this.checkBox_Using_Sato.AutoSize = true;
this.checkBox_Using_Sato.Location = new System.Drawing.Point(7, 62);
this.checkBox_Using_Sato.Name = "checkBox_Using_Sato";
this.checkBox_Using_Sato.Size = new System.Drawing.Size(118, 17);
this.checkBox_Using_Sato.TabIndex = 10;
this.checkBox_Using_Sato.Text = "Using SATO Printer";
this.checkBox_Using_Sato.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(302, 100);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(118, 13);
this.label3.TabIndex = 14;
this.label3.Text = "SATO Specific Settings";
//
// Form_Print
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(889, 474);
this.Controls.Add(this.label3);
this.Controls.Add(this.panel1);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox_Log);
this.Controls.Add(this.checkBoxPause);
this.Controls.Add(this.checkBox_FlucheCache);
this.Controls.Add(this.checkBox_Show_Bartender);
this.Controls.Add(this.button_flush_cache);
this.Controls.Add(this.label1);
this.Controls.Add(this.comboBox_Bartender_File);
this.Controls.Add(this.button_Print);
this.Name = "Form_Print";
this.Text = "*** SATO Printer Application FPA ***";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button_Print;
private System.Windows.Forms.ComboBox comboBox_Bartender_File;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button_flush_cache;
private System.Windows.Forms.CheckBox checkBox_Show_Bartender;
private System.Windows.Forms.CheckBox checkBoxPause;
private System.Windows.Forms.CheckBox checkBox_FlucheCache;
private System.Windows.Forms.TextBox textBox_Log;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox_IP_Address;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button_Check_Sensor;
private System.Windows.Forms.TextBox rtxtRecv;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox checkBox_Using_Sato;
private System.Windows.Forms.TextBox textBox_Command;
private System.Windows.Forms.Label label6;
}
}
Call Stack
Instances of this error (1)
Print Form1.Designer.cs Line:163 Column:1 Hide Call Stack
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.ParseXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnMethodPopulateStatements(Object sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Statements()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
Upvotes: 1
Views: 1059
Reputation: 704
Using the Designer code you posted, I was able to view the form. I am betting on old files, or VS just getting "confused". I cannot say it any better than that, and this type of thing has happened to me before.
First step is to Build -> Clean Solution. Then close and re-open the solution.
If this doesn't work, make sure to do what Dave S and Will mention above, and manually delete all /bin and /obj folders. Then close and re-open.
If neither of these of work, you can do a bit more debugging to see exactly where the problem is by opening your project (without opening the form), then open a 2nd blank Visual Studio window (no project), then use the "Attach" feature to select the first Visual Studio window ("devenv.exe" in the list that opens after you hit "Attach"). Next, open your form, and see where the error leads you.
I know this isn't a full solution, but hopefully it helps get to the next step of what is wrong. I wish you luck, as I know toying with tools is painful and unproductive.
Upvotes: 1