<:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them? <:3)~ Global Variables, whathappened to them?
<:3)~ Global Variables, whathappened to them?
Go Back  Xtreme Visual Basic Talk > > > <:3)~ Global Variables, whathappened to them?


Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2004, 06:51 PM
Shanku Shanku is offline
Newcomer
 
Join Date: Jun 2004
Posts: 7
Default <:3)~ Global Variables, whathappened to them?


Hmm.. I'm currently using .NET and I couldnt figure out how make global variables. Very different from VS 6.0, which you simply go create a module and declare the variable like this:
Code:
Global sTemp as String
However, I couldn't figure out how to do it for .NET VB because it would not allow me to do it the same way as in VS VB 6.0

Ugh, can anyone please give me a hand?

<:3)~
Reply With Quote
  #2  
Old 07-29-2004, 07:27 PM
Iceplug's Avatar
Iceplug&lt;:3)~ Global Variables, whathappened to them? Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

What is this?
<:3)~ <-- a mouse?

You can use Public variables instead of Global variables.
But, if you want a variable to access from anywhere, you need to declare it as a Shared variable.
Like, in a class that you have:
Public Class whatever
Public Shared globalvar As Integer

You can access it like this:
whatever.globalvar .
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 07-29-2004, 08:52 PM
reboot's Avatar
reboot&lt;:3)~ Global Variables, whathappened to them? reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,614
Default

As always, .Net or before, using variables in this manner is typically considered bad technique.
__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
&lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them? &lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them?
 
&lt;:3)~ Global Variables, whathappened to them?
&lt;:3)~ Global Variables, whathappened to them?
 
-->