日期:2014-05-18  浏览次数:20826 次

如何在上次关闭位置启动程序窗体
如何在上次关闭位置启动程序窗体!!!!!

------解决方案--------------------
关闭时保存窗体位置,启动时读取。
------解决方案--------------------
探讨
关闭时保存窗体位置,启动时读取。

------解决方案--------------------
在settings.setting文件中加入:
WindowGeometry string User
WindowGeometryOpen string User 
WindowGeometrySearch string User

相关代码:
C# code
public MainForm()
{
 GeometryFromString(Properties.Settings.Default.WindowGeometry, this);
}

------解决方案--------------------
C#中使用Setting保存用户自定义窗体位置及大小


很早在codeproject上看到的!
------解决方案--------------------
关闭时保存窗体位置,启动时读取。 

------解决方案--------------------
设置Application属性的Location
然后在关闭函数里面写Properties.Settings.Default.Save();