且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在程序中进行预设

更新时间:2023-08-23 15:04:46

使用设置:
1)在属性"下查看您的项目
2)双击设置.设置
3)添加一个适当的字段.
4)在您的代码中,使用Properties.Settings.Default.NameOfPropertyYouSetAbove访问当前值.
5)在表单关闭"事件中,将上面的属性设置为当前值,然后调用Properties.Settings.Default.Save方法
Use the settings:
1) Look in your project under Properties
2) Double click Settings.Settings
3) Add an appropriate field.
4) In your code, use Properties.Settings.Default.NameOfPropertyYouSetAbove to access the current value.
5) In the Form Close event, set the property above to the current value, and call the Properties.Settings.Default.Save method