使用自定义 vb.net 按钮追加添加和读取 regedit
我的表单上有 26 个按钮(每个按钮都是字母表中的一个字母),我想按一个按钮,比如 Z,然后它将相关注册表项值从 0 更改为 1,表示该按钮已被单击(这些 az 按钮是与开/关开关进行比较)。这样,如果我再次启动程序,注册表中的值将“记住”在我们之前的程序会话中打开了哪些按钮,关闭了哪些按钮。
最终,关闭的按钮应始终显示为红色,直到再次打开
。有人知道如何实现这一目标吗?
I have 26 buttons on my form (each a letter of the alphabet) I want to press a button lets say Z and that it then changes the relevant registry key value of 0 to 1 representing the button has already been clicked (these a-z buttons are to be compared with on/ off switches). This way if I start my program up again the values in the regedit will “memorize" which buttons were turned on and which were turned off in our previous program session.
Ultimately the buttons turned off should always appear as red until switched on again.
Does anybody know how to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您正在使用的平台或语言,有一些名为“设置”的选项,它保存您在应用程序上工作的所有信息,并在应用程序再次启动时检索它们,
因为我熟悉 C#,此链接可以帮助您(如果您正在工作)在 C# 上。对于其他平台,请尝试用谷歌搜索这些平台是如何使用的。
干杯,
维韦克
Depending upon the Platform or Language you are working on , there are options called Settings , Which save all the information of what you worked on application and retrieve them back when the application has started again,
As i am familiar with C# , This link Helps you if you're working on C#. For other platforms, try to google out how are these used.
Cheers,
Vivek