在VB.NET中单击按钮后永久隐藏标签 [英] Hide the label forever after click button in VB.NET

查看:104
本文介绍了在VB.NET中单击按钮后永久隐藏标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想永远隐藏标签,当它点击按钮时,即使程序重新启动



我尝试过:



我想永远隐藏标签,当它点击按钮时,即使程序重启

解决方案

Quote:

我想永远隐藏标签,

很明显,只是把它藏起来。你自己也做了,对吧?

引用:

即使程序重启

现在是问题。在这种情况下,您需要在本地文件,JSON文件,XML或您自己定义的内容中维护程序的状态。



概念是序列化/反序列化,您必须将应用程序的状态存储在文件中并再次加载。加载文件后,您将检查是否显示该按钮。



我写过一篇文章,讲述了JSON中的相同概念,请阅读并探讨如何将它用于自己的目的,使用C#在JSON中从零到英雄 [ ^ ]


Hi, I want to hide the label forever, when it's clicked on the button, even if the program is restarted

What I have tried:

Hi, I want to hide the label forever, when it's clicked on the button, even if the program is restarted

解决方案

Quote:

Hi, I want to hide the label forever,

Quite obvious, just hide it. That you have done yourself, too, right?

Quote:

even if the program is restarted

Now that is the problem. In this case you need to maintain the state of the program in a local file, a JSON file, XML, or something that you have defined for yourself.

The concept is serialization/deserialization, you would have to store the state of the application in the file and load it back again. Upon loading the file, you will then check whether to show the button or not.

I have written an article that speaks about the same concept in JSON, please read it and explore how you can use it to your own purpose, From zero to hero in JSON with C#[^]


这篇关于在VB.NET中单击按钮后永久隐藏标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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