VB.表格和模块 [英] VB. forms and modules

查看:99
本文介绍了VB.表格和模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VB中声明了一个数组并对其进行了初始化,但是即使我转VB,我也希望该值保留在内存中.

同样,如果有人知道如何让多个表单共享一个模块或数组.

I declared a array in VB and initialized it however I want the value to stay in memory even if I turn of VB.

Also if anyone knows how to have multiple forms share a module or an array.

推荐答案

完成任务的最佳技术是Serialization,请看MSDN文章:如何:在Visual Basic .NET中对XML进行序列化和反序列化" [
The best technique to accomplish your task is Serialization, have a look at MSDN article: "HOW TO: Serialize and Deserialize XML in Visual Basic .NET"[^].


如果我不是在VB中处理不当,它具有类模块,项目中的所有表单都可以使用它,类似于在模块中声明的数组,所有形式都可以使用此数组
IF I am not mistasken,in VB it has class module that all form in project can use it, Similar an array if it was declared in module, All form can use this array


这篇关于VB.表格和模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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