Here is my solution:
Declare this struct to store the settings of a toolbar:
[Serializable]
public struct ToolStripSettings
{
public bool Visible;
public Point Location;
}
Code to save
// save toolbar settings
List<ToolStripSettings> toolSettings = new List<ToolStripSettings>();
// mToolbars is initialized in the constructor to contain all of your toolbar members
// you could also probably populate it with reflection
foreach (ToolStrip ts in mToolbars)
{
ToolStripSettings tss = new ToolStripSettings();
tss.Visible = ts.Visible;
tss.Location = ts.Location;
toolSettings.Add(tss);
}
// serialize the toolSettings list wherever you keep the
// rest of your user-specific settings
Code to restore
// Load toolstrip settings, if any
if (/*deserialized storage location*/ != null)
{
for (int i = 0; i < mToolbars.Length; i++)
{
mToolbars[i].Visible = /*deserialized storage location*/[i].Visible;
mToolbars[i].Location = /*deserialized storage location*/[i].Location;
}
}