Hi
Any one has any Idea about how to resolve this issue?
Regards
-Vivek
Hi Everyone,
I want to persist my windows forms toolstrips postion(Location),
Visibility for one session to another session. For this purpose i want to
use ToolStripManger, but with this approach i am facing following probelms
1. Toolstrips does not get to its orgianl position it was before minimize
2. In next session Few toolstrips does not get back to its last session
position.
Following is the code for this purpose. You can also refer to the attached
zip for the project(its VS2005)
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ToolStripManager.LoadSettings(this);
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
ToolStripManager.SaveSettings(this);
Properties.Settings.Default.Save();
}
private void Form1_SizeChanged(object sender, EventArgs e)
{
if (this.WindowState != FormWindowState.Minimized)
{
Properties.Settings.Default.Reload();
ToolStripManager.LoadSettings(this);
}
}
private void toolStrip1_EndDrag(object sender, EventArgs e)
{
ToolStripManager.SaveSettings(this);
Properties.Settings.Default.Save();
}
private void toolStrip2_EndDrag(object sender, EventArgs e)
{
ToolStripManager.SaveSettings(this);
Properties.Settings.Default.Save();
}