PasterOfMuppets (06-11-2011),proman98 (06-11-2011),smonist (06-13-2011),Sprite (06-11-2011),~YouTube~ (06-12-2011)
Coding Basics
As you write more different programs, you'll need to start insert more and more of Visual Basic's programming language into your applications. The Visual Basics language, although one of the easiest to master, it can be tricky in places. But, if you start with the fundamentals, you'll have no trouble mastering the hard parts.
A VB Program always need these 3 things(If 1 is missing , the program will not work):
- One or more forms
- Controls on the forms
- Code written in the Visual Basic programming language
Although you can create great-looking applications just by dragging controls onto forms and setting properties, the applications don't really become useful until you add code to tie the controls together and to perform calculations and data manipulation when needed. No control exists to calculate inventory accounting values; you must add the code to do things like that. The program code that you write is just a detailed set of instructions that tells Visual Basic how to manipulate data, perform input and output , and respond to the user.
What are Form Module and Standard Module?
A form module is a module file that holds one or more forms and the code that goes with each form. A standard module is a file that holds code not related to a form.
[B]Data Basics[/B]
Now that you have a better idea of how code goes together to support a Visual Basic application, you're ready to begin the specifics.
Datatypes
Data falls into three broad categories: numeric, string, and special. If you want to work with a number, you'll need to use a number that fits within one of VB's datatype categories. If you want to work with text data, you'll need to use a string. Other data might fall into one of several special datatype categories, such as an item (like the value of True or False) that represents a check box.
What are strings?
A string is a series of zero or more characters that you treat as a single entity. VB supports both fixed-length and variable-length strings.
The Visual Basic datatypes.
Boolean: A datatype that takes on one of two values only: True or False. True and False are reserved words in Visual Basic, meaning that you cannot use them for names of items you create.
Byte :Positive numeric values without decimals that range from 0 to 255.
Currency: Data that holds dollar amounts from -$922,337,203,685,477.5808 to $922,337,203,685,477.5807. The four decimal places ensure that proper rounding can occur. VB respects your Windows International settings and adjusts currency amounts according to your country's requirements. Never include the dollar sign when entering Currency values.
Date: Holds date and time values. The date can range from January 1, 100, to December 31, 9999. (In the years following 9999, people will have to use something other than Visual Basic!)
Decimal :A new datatype not yet supported in Visual Basic except in a few advanced situations. The Decimal datatype represents numbers with 28 decimal places of accuracy.
Double: Numeric values that range from -1.79769313486232E+308 to 1.79769313486232E+308. The Double datatype is often known as double-precision.
Integer: Numeric values with no decimal point or fraction that range from -32,768 to 32,767.
Long: Integer values with a range beyond that of Integer data values. Long data values range from -2,147,483,648 to 2,147,483,647. Long data values consume more memory storage than integer values, and they are less efficient. The Long datatype is often called a long integer.
Object: A special datatype that holds and references objects such as controls and forms.
Single Numeric values that range from -3.402823E+38 to 3.402823E+38. The Single datatype is often called single-precision.
String: Data that consists of 0 to 65,400 characters of alphanumeric data. Alphanumeric means that the data can be both alphabetic and numeric. String data values may also contain special characters such as ^, %, and @. Both fixed-length strings and variable-length strings exist.
Variant: Data of any datatype, used for control and other values for which the datatype is unknown.
[IMG]https://i1114.photobucke*****m/albums/k538/ImminentJM/takari.png[/IMG]
PasterOfMuppets (06-11-2011),proman98 (06-11-2011),smonist (06-13-2011),Sprite (06-11-2011),~YouTube~ (06-12-2011)
Good job bro will help begginers alot
thx! can we use Double datatype in Crossfire Base?
double: a floating-point data type with twice the precision of float.
(_¸.•*´'`°¤¸'¸¤°´'`*•.¸_)
Video Creator
GFX Creator
C++ Coder
D3D Coder
(¯`*•.¸,¤°´'`°¤,¸.•*´¯)
[IMG]https://i1114.photobucke*****m/albums/k538/ImminentJM/takari.png[/IMG]
Good tuts you give, will help some ppl.
lol i dont understand what this is for
Rep. Power: 126
Minion: 11/28/12-3/15/14
ok @Takari, can you make also Tuts(later) for c++ ?
(_¸.•*´'`°¤¸'¸¤°´'`*•.¸_)
Video Creator
GFX Creator
C++ Coder
D3D Coder
(¯`*•.¸,¤°´'`°¤,¸.•*´¯)
Great thread.
DEHUMANIZE YOURSELF
AND FACE TO BLOODSHED
great man.
good job !
Help your country,join eRepublik
-----------------#######------------------#######--------------#######--------------------
Help your country,join e-Sim Primera
-----------------#######------------------#######--------------#######--------------------
Help your country,join e-Sim Secura
-----------------#######------------------#######--------------#######--------------------
Help your country,join CyberRepublik
-----------------#######------------------#######--------------#######--------------------
Menssager : andrinhole_mpgh@live.com
Go Pokeball ! Vai Pokebola !
My noob Cf account
im lost...
Rep. Power: 126
Minion: 11/28/12-3/15/14
nice, very nice
Bernard (06-11-2011)
so hacks count as a program kinda thing?
Rep. Power: 126
Minion: 11/28/12-3/15/14