Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

fireindy

fireindy Avatar

**
Official Member

114


May 2007
Found this lying around, thought it might be useful.


Since Im a Visual Basic coder, I thought what the hek and thought Id submit a tutorial. I use Microsofts Visual Basic Express Edition to edit my code and if anyone does any VB, its different than VB6 and little different that .NET. But anyway, Im going to show you variables.

Variables
--------------------

In visual Basic, you can assign different things to be a variable. For example:


Dim vInt as Integer
vInt = 1


That code would make "vInt" an integer. You can use that variable later.
---------------------------------
To explain further:


Dim ....


When you use "Dim", you are going to announce what a variable is. Some can be: Integers, Strings, (etc)
---------------------------

Dim vInt..


You then declare what you want to name the variable.
----------------------------------------------------------------------

Dim vInt As Integer


That just says you want to declare "vInt" As an Integer.
----------------------------------------------------------------------

Dim vInt as Integer
vInt = 1


Then you declare the number you want to use because you declared it as an integer.
----------------------------------------------------------
So, like I said before, you can use that variable later. For example, if you had:


Dim vInt as Integer
vInt = 1
Textbox1.Text = vInt + 1


That would return Texbox1's text property to vInt + 1. (because vInt is an Integer, you can add other integers to it)



Andrew McGivery

Andrew McGivery Avatar
Formerly Fredy

******
Legendary Studio Member

Male
5,742


September 2005
short. Very short. :P
k

newBookmarkLockedFalling