公共变量 [英] Public Variables

查看:87
本文介绍了公共变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在我的

计划中为所有表格和模块提供的变量,我应该在哪里声明它们?我刚刚创建了一个

模块,并将它们全部公开。

这样做的正常途径是什么?


谢谢,


Thomas


-

通过NewsDemon.com发布 - 高级未经审查的新闻组服务

------->>>>> ;> http://www.NewsDemon.com<<<<<< ------

无限制访问,匿名帐户,未经审查的宽带访问


Variables that I would like to make available to all forms and modules in my
program, where should I declare them? At the momment I just created a
module and have them all declared public there. What is the normal way to
do this?

Thanks,

Thomas

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access

推荐答案

我相信你做得恰到好处,我也使用了一个模块,但是

稍微扭曲一下我使用的朋友而不是公共VB.Net模块


问候


M. Posseth [MCP]


< th ***** @ msala.net>在消息中写道

news:43 ********************** @ news.newsdemon.com ..。
well i believe you do it just right , i also use a module for that , however
with one slight twist i use Friend instead of public in VB.Net modules

regards

M. Posseth [MCP]

<th*****@msala.net> wrote in message
news:43**********************@news.newsdemon.com.. .

我想在
我的
程序中提供所有表单和模块的变量,我应该在哪里声明它们?在那个我刚刚创建了一个
模块并将它们全部宣布在那里。什么是正常的方式来做这个?

谢谢,

托马斯

-
通过NewsDemon发布。 com - 高级未经审查的新闻组服务
------->>>>>> http://www.NewsDemon.com<<<<<< - -----
无限制访问,匿名帐户,未经审查的宽带访问

Variables that I would like to make available to all forms and modules in
my
program, where should I declare them? At the momment I just created a
module and have them all declared public there. What is the normal way to
do this?

Thanks,

Thomas

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access





感谢您的快速回答。我一直在使用VB2005大约一个月

。我从未使用过朋友,但是我会查阅并阅读它。


Thomas


-

通过NewsDemon.com发布 - 高级未经审查的新闻组服务

------->>>>>> http://www.NewsDemon.com<< ;<<<< ------

无限制访问,匿名帐户,未经审查的宽带访问

Thanks for the quick answer. I have been using VB2005 for about a month
now. I have never used Friend, but I will look it up and read about it.

Thomas

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access


您声明它们在一个标准模块中,使该模块成为项目'

启动项目。


朋友级别范围使项目可以在程序集中的任何位置访问。 />
公共范围使项目可以在INSIDE或OUTSIDE的任何地方访问

汇编。

< th ***** @ msala.net>在消息中写道

news:43 ********************** @ news.newsdemon.com ..。
You declare them in a standard Module and make that Module the project''s
startup item.

Friend level scope makes the item accessible anywhere IN the assembly.
Public scope makes the item accessible anywhere INSIDE or from OUTSIDE the
assembly.
<th*****@msala.net> wrote in message
news:43**********************@news.newsdemon.com.. .

感谢您的快速解答。我现在已经使用VB2005大约一个月了。我从来没有使用过朋友,但是我会查阅并阅读它。

托马斯

-
发表于NewsDemon.com - 高级未经审查的新闻组服务
------->>>>>> http://www.NewsDemon.com<<<<<<< ------ <无限访问,匿名帐户,未经审查的宽带访问

Thanks for the quick answer. I have been using VB2005 for about a month
now. I have never used Friend, but I will look it up and read about it.

Thomas

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access



这篇关于公共变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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