关闭时保存复选框设置 [英] Save checkbox settings on close

查看:69
本文介绍了关闭时保存复选框设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个程序可以向选定的收件人发送电子邮件。


我有两种表格。一个用于创建和发送电子邮件,另一个用于选择收件人和其他信息。


该程序运行良好但每次关闭程序时我都会丢失收件人的所有设置其他信息。


使用复选框选择收件人,电子邮件的其他信息在文本框中。


无论如何都要保存这些设置当程序关闭时。

解决方案

首先放入Form,FormClosing事件处理程序或FormClosed事件处理程序,或者现在不执行,然后检查此代码:


My.Settings.Save()


我希望这有用。


Hi Atran


我以为它也会那么简单。


我试过把my.settings.save包括在表格关闭上在表单加载时添加了my.settings.reload但没有欢乐。


我还有什么需要做的吗?这个设置有用吗?


任何人都可以帮我这个。


每次关闭表单时都要重做设置让我感动#^%

Hi

I have a program that sends an email to selected recipients.

I have two forms. One that creates and send the email and another that is used to select recipients and other information.

The program works great but everytime I close the program I lose all the settings for the recipients and other information.

The recipients are selected using checkboxes and other information for email is in text boxes.

Is there anyway to save these settings when the program is closed.

解决方案

First put to your Form, FormClosing Event Handler, or FormClosed Event Handler, or not do that now, then Check this Code:

My.Settings.Save()

I hope this is helpful.


Hi Atran

I thought it was going to be that simple too.

I''ve tried including my.settings.save on form closing and also added my.settings.reload on form load but no joy.

Is there something else I have to do to make this setting work?


Can anyone please help me with this.

Having to redo the settings every time I close the form is driving me #^%


这篇关于关闭时保存复选框设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆