Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolstripmanager savesettings

Status
Not open for further replies.

EagleTempest

Technical User
Jun 15, 2004
125
CA
I want to save toolbar locations using the new .NET 2.0 toolstripmanager command in VB 2005.

I've seen many examples of
Code:
Toolstripmanager.savesettings(me)

However I receive a [red]Configuration system failed to initialize[/red] error.

I've tried to look up this error regarding the toolstripmanager but have had no luck.

Any ideas?
 
I found an easy way to save the location of toolbars.

In the Settings of project, create a variable using variable type of System.Drawing.Point to store the object's location point. I called my variable: pntToolbar1.

Then to load the location:
Code:
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

ToolStrip1.Location = My.Settings.pntToolbar1
and to save the location
Code:
 Private Sub frmMain_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

My.Settings.pntToolbar1 = ToolStrip1.Location

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top