Save my program for God's sake!!!!  
Author Message
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

Just as I was getting some decent work done on my project, I set down my keyboard to make a bathroom run, and once i returned, I found my cat lying on my keyboard... When I tried to clean up the constaint garbage that was created by him, I tried running my program and found a ton of new errors.

What makes it worse is that I have this bugged sucker saved...

Tried cleaning it up, and like a freakin moron, I saved it before I re-ran the program.

Apparently I changed something mere mortals such as my self shouldn't have touched.

partial class Form4

{

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

{

System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form4));

this.label1 = new System.Windows.Forms.Label();

this.button1 = new System.Windows.Forms.Button();

this.button2 = new System.Windows.Forms.Button();

this.label2 = new System.Windows.Forms.Label();

this.SuspendLayout();

//

// label1

//

this.label1.AutoSize = true;

this.label1.BackColor = System.Drawing.Color.Transparent;

this.label1.Location = new System.Drawing.Point(162, 44);

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(259, 26);

this.label1.TabIndex = 0;

this.label1.Text = "Charicter Creation (Continued)";

//

// button1

//

this.button1.Font = new System.Drawing.Font("Old English Text MT", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.button1.Location = new System.Drawing.Point(235, 486);

this.button1.Name = "button1";

this.button1.Size = new System.Drawing.Size(75, 23);

this.button1.TabIndex = 1;

this.button1.Text = "Quit";

this.button1.UseVisualStyleBackColor = true;

this.button1.Click += new System.EventHandler(this.button1_Click);

//

// button2

//

this.button2.Location = new System.Drawing.Point(222, 210);

this.button2.Name = "button2";

this.button2.Size = new System.Drawing.Size(100, 32);

this.button2.TabIndex = 2;

this.button2.Text = "Generate";

this.button2.UseVisualStyleBackColor = true;

this.button2.Click += new System.EventHandler(this.button2_Click);

//

// label2

//

this.label2.AutoSize = true;

this.label2.Location = new System.Drawing.Point(230, 120);

this.label2.Name = "label2";

this.label2.Size = new System.Drawing.Size(59, 26);

this.label2.TabIndex = 3;

this.label2.Text = "label2";

this.label2.Click += new System.EventHandler(this.label2_Click);

//

// Form4

//

this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 26F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));

this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;

this.ClientSize = new System.Drawing.Size(550, 550);

this.Controls.Add(this.label2);

this.Controls.Add(this.button2);

this.Controls.Add(this.button1);

this.Controls.Add(this.label1);

this.Font = new System.Drawing.Font("Old English Text MT", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

this.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);

this.Name = "Form4";

this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

this.Text = "Form4";

this.ResumeLayout(false);

this.PerformLayout();

}

#endregion

private System.Windows.Forms.Label label1;

private System.Windows.Forms.Button button1;

private System.Windows.Forms.Button button2;

private System.Windows.Forms.Label label2;

}

}

I got a total of seven warnings and nine errors.

Warning 1 The field 'Drawing' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

Warning 2 The field 'Drawing' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

Warning 3 The field 'Windows' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

Warning 4 The field 'Windows' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

Warning 5 The field 'Drawing' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

Warning 6 The field 'Windows' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

Warning 7 The field 'Windows' could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.

All the error messages are the same but make references to different places where system is mentioned.


Error 8 'WindowsApplication1.Form4.System()' is a 'method', which is not valid in the given context






Visual C#17  
 
 
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

Sorry for the long code sample. The errors and warning occured throughout my document. My question is what in God's name did I change, and how can I fix it so I kill the errors.



 
 
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

Also noticed another big problem. I just tried to view my form4 design and it will not even display anything but a big red warning with a red circle with a white x to the left side. It reads as follows:

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

The field drawing could not be found on the target object. Make sure that the field is defined as an instance variable on the target object and has the correct scope.



 
 
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

Never mind. I just got sick of the damn thing and created a new form4 in the place of the old one.

I would like to know though for future reference what I possibly did, if anyone has a clue.



 
 
cablehead





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

If you are working with Framewerk 2....or not...

Your cat prob deserves a treat.....I have seen and chased the crazziest "bugs".....lately...

My dog loves my chair when Im not around....I sit back down....a toolstrip background image is gone. In this case ...destroying the UI....5 fuc*ing hours later....the image can now be loaded. Why NO one knows....VS IDE has 10 million bugs.

Many friends are diving into this begging for the stability........of vb6!

 

good luck.

Mark this as the answer...Its a feature...

PS...it takes me 10 minutes to find the refresh button in IE7....the cat is in or around the hat.

 



 
 
ahmedilyas





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

you tried undo-ing what was edited (Edit > undo or CTRL+Z)

 
 
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

Tried undoing it. I saved it and turned my pc off for thwe night before trying to fix it. Undo was not available. Good idea though.

Let this be an importaint lesson to all. Save often, but be intelligent about it.



 
 
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

After some testing in another program, I was able to create the error again.

Apparently, if one uses the undo feature a few times, it will come to the point when an error message will appear (forgot what it was about.) By clicking on the ok button, the program becomes horrably unstable, to the point where form4 window ceased to function (and displaying the error message I discussed earlier.)

Perhapse this could be manipulated again on someone elses PC, or it is one of thoes glitches that occured because of my misgivings in programming.
This I have yet no clue about.



 
 
ahmedilyas





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

are you referring to the message that comes up about something relating to the designer view that if you continue to undo the changes in the designer will be removed or something

 
 
Ravencraft





PostPosted: Visual C# General, Save my program for God's sake!!!! Top

That would be aqn affirmative. I kinda figured out NOT to overuse the undo. I was wondering why it does this