all groups > visual studio .net debugging > june 2004 >
You're in the

visual studio .net debugging

group:

IDE is changing design mode settings when compiling


IDE is changing design mode settings when compiling jonas NO[at]SPAM bootman.se
6/22/2004 9:01:31 AM
visual studio .net debugging:
I have run into a problem that I can't understand and it is becoming
really annoying.

The problem occurs when I compile my solution. When compiling the
IDE(?) sometimes removes properties that are set in the "Designer
generated code" region.

Let me give you an example...

In one of my forms I have a standard TabControl, placed on the form by
draging and dropping from the toolbox. It has the Dock property set to
'Fill'. Two TabPage's have been added to the TabControl by clicking on
the TabPages property in the Properties Windows. On both of these tab
pages there are other control's (textbox, datagrid etc).

When compiling something happen. The TabControl is nolonger filling my
form, it's possitioned in the upper left corner of the form and it has
no TabPages.

Looking in "Designer generated code" region I have the following code
:

//
// tabControl1
//
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(0, 0);
this.tabPage1.Name = "tabPage1";
this.tabPage1.TabIndex = 0;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(0, 0);
this.tabPage2.Name = "tabPage2";
this.tabPage2.TabIndex = 0;


Normally i.e. the TabControl has more properties set like this...

this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Size = new System.Drawing.Size(410, 335);
etc...

Looking further in the "Designer generated code" region, all control's
that has been draged-and-dropped on to the form has its Location
property set to System.Drawing.Point(0, 0). Unfortunately, I don't
know which properties that are normally set by the IDE so I don't know
which other properities are changed or is missing/removed.

Has anyone else had this problem?
What am I doing wrong?
How can I fix this? Is there a "undo" for this? Today I have to
re-create the form :(

Thanks!

BR
Re: IDE is changing design mode settings when compiling Giacomo
6/22/2004 6:29:32 PM
Do you use sourcesafe? I ask because this is a problem common to having an
older binary (.frx as opposed to .frm) somewhere. Another guess may be that
you have right protected an old version of the binary ".frx"?
Giac
[quoted text, click to view]

Re: IDE is changing design mode settings when compiling jonas NO[at]SPAM bootman.se
6/22/2004 11:20:16 PM
No, I don't use any version handling software, but I have CVS NT
installed on the same PC.

Regarding the .frx binary. Is that a file that is associated with
SourceSafe?

/Jonas

[quoted text, click to view]
AddThis Social Bookmark Button