For many years I struggled with several tools in the toolstripcontainer. I have a current .NETv3.5 application written in VS2008 where the location of the dashboards is random. A lot of custom code has been made to fix this, but with no luck.
I am currently working in VS2012 on a .NETv4.5 application that also has several tools. I created a very small test application, which is a form with an attached toolstripcontainer and 4 dashboards. During development, I added 3 toolbars at the bottom and 1 to the right.
Without adding code and starting this application, my dashboards are located in the same place as during development. Now I reorder the top 3 toolbars and restart the application. My order changes are not saved, and the dashboards again, as during development.
Now I am adding these lines of code:
public partial class Toolstrips : Form { private string keyName; public Toolstrips() { this.InitializeComponent(); this.keyName = Application.ProductName + this.Name + "xyz"; ToolStripManager.LoadSettings(this, this.keyName); } private void Toolstrips_FormClosing(object sender, FormClosingEventArgs e) { ToolStripManager.SaveSettings(this, this.keyName); } }
And yet in VS2102 with .NETv4.5 this does not work. I can change the order that I want after restarting the application, and all toolbars will be restored to temporary project locations.
I was hoping this would be fixed in VS2012, but apparently not. Does anyone have a job to make this work?
EDIT: added user.config content
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripTable" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripPan" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripStandard" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripZoom" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> </sectionGroup> </configSections> <userSettings> <System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripTable> <setting name="ItemOrder" serializeAs="String"> <value>toolStripButton4</value> </setting> <setting name="IsDefault" serializeAs="String"> <value>False</value> </setting> <setting name="Size" serializeAs="String"> <value>29, 42</value> </setting> <setting name="ToolStripPanelName" serializeAs="String"> <value>toolStripContainer1.Right</value> </setting> <setting name="Visible" serializeAs="String"> <value>True</value> </setting> <setting name="Location" serializeAs="String"> <value>0, 336</value> </setting> <setting name="Name" serializeAs="String"> <value>toolStripTable</value> </setting> </System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripTable> <System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripPan> <setting name="ItemOrder" serializeAs="String"> <value>toolStripButton3</value> </setting> <setting name="IsDefault" serializeAs="String"> <value>False</value> </setting> <setting name="Size" serializeAs="String"> <value>40, 31</value> </setting> <setting name="ToolStripPanelName" serializeAs="String"> <value>toolStripContainer2.Top</value> </setting> <setting name="Visible" serializeAs="String"> <value>False</value> </setting> <setting name="Location" serializeAs="String"> <value>288, 0</value> </setting> <setting name="Name" serializeAs="String"> <value>toolStripPan</value> </setting> </System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripPan> <System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripStandard> <setting name="ItemOrder" serializeAs="String"> <value>newToolStripButton,openToolStripButton,saveToolStripButton,printToolStripButton,toolStripSeparator,cutToolStripButton,copyToolStripButton,pasteToolStripButton,toolStripSeparator1,helpToolStripButton</value> </setting> <setting name="IsDefault" serializeAs="String"> <value>False</value> </setting> <setting name="Size" serializeAs="String"> <value>248, 31</value> </setting> <setting name="ToolStripPanelName" serializeAs="String"> <value>toolStripContainer2.Top</value> </setting> <setting name="Visible" serializeAs="String"> <value>False</value> </setting> <setting name="Location" serializeAs="String"> <value>6, 0</value> </setting> <setting name="Name" serializeAs="String"> <value>toolStripStandard</value> </setting> </System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripStandard> <System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripZoom> <setting name="ItemOrder" serializeAs="String"> <value>toolStripButton1,toolStripButton2</value> </setting> <setting name="IsDefault" serializeAs="String"> <value>False</value> </setting> <setting name="Size" serializeAs="String"> <value>29, 73</value> </setting> <setting name="ToolStripPanelName" serializeAs="String"> <value>toolStripContainer2.Right</value> </setting> <setting name="Visible" serializeAs="String"> <value>False</value> </setting> <setting name="Location" serializeAs="String"> <value>0, 71</value> </setting> <setting name="Name" serializeAs="String"> <value>toolStripZoom</value> </setting> </System.Windows.Forms.ToolStripSettings.GUI-prototypeToolstripsxyz.toolStripZoom> </userSettings> </configuration>
EDIT2 I created a small VS2012 application written in C # to illustrate my problem. You can download it here: https://mapwindow5.svn.codeplex.com/svn/tmp/ToolstripDemo/ToolstripDemo.zip When I launch the application, I see:

When I reorder the 3 top dashboards, I get the following:

Now I close the application and open it again, I get the starting locations:

Now I move the toolbar that was attached to the top right:

I open the application again, and I see that the 4th toolbar is still at the top, which is normal, but there is no order. Look at the last two toolbars:

Another weird thing is that I cannot reorient the zoom bar to the right again. The dashboard just disappears:

When I open the form in VS2012, the dashboards also rearrange: 
I'm not sure why. I just open the form.
I did my testing and took screenshots by running exe from Explorer, and not in VS debugging mode.
Hopefully now itβs clearer what I mean and what I need. Any advice is greatly appreciated.