Link to home
Start Free TrialLog in
Avatar of _Wade_
_Wade_

asked on

Visual Studio 2008 Designer ToolStrip changes locations of toolstrips after recompiling

Hi,

I have a form application written in Visual Studio 2008. It has a toolstripcontainer with 3 ToolStrips on it.  The locations for the toolstrips are set in InitialComponent() like so:
this.ToolStrip1.Location = new System.Drawing.Point(56, 0);
this.ToolStrip2.Location = new System.Drawing.Point(263, 0);
this.ToolStrip3.Location = new System.Drawing.Point(578, 0);

However, after viewing the designer, these values are automatically being reset to these default values:
this.ToolStrip1.Location = new System.Drawing.Point(40, 50);
this.ToolStrip2.Location = new System.Drawing.Point(11, 25);
this.ToolStrip3.Location = new System.Drawing.Point(3, 0);

What's going on here? Does this happen in VS 2010 as well?

Regards,


Wade
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Do you have any anchoring or docking setup?
Avatar of _Wade_
_Wade_

ASKER

No
Avatar of _Wade_

ASKER

So you think it's due to anchoring?  I believe I tried this one time and it didn't work.  What I'm doing is I'm manually positioning them in the designer where I want them. I was thinking that anchoring or docking would affect this.
Do you open the form in maximized size? Many things can affect this including anchoring.
ASKER CERTIFIED SOLUTION
Avatar of pnedic
pnedic
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _Wade_

ASKER

All of the doc properties for the toolstrips are set to "none"
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial