Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,444 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,443 people online right now. Registration is fast and FREE... Join Now!




Programming Reference Sheets: Visual Basic

3 Pages V  1 2 3 >  
Reply to this topicStart new topic

Programming Reference Sheets: Visual Basic

skyhawk133
post 14 Aug, 2006 - 09:19 AM
Post #1


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,844



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


Alrighty you VB experts, I need your help putting together the ref sheet for Visual Basic.

It should cover the same type of things the C++ ref sheet covers, and we'll eventually do a more advanced one. Post everything here and we'll start to assemble this bad boy!
User is offlineProfile CardPM

Go to the top of the page

Jayman
post 14 Aug, 2006 - 09:24 AM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,839



Thanked 38 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

My Contributions


Will this be a VB.NET ref sheet or VB6?
User is offlineProfile CardPM

Go to the top of the page

skyhawk133
post 14 Aug, 2006 - 09:32 AM
Post #3


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,844



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


Let's go with VB6 as that is what is still taught in most schools I believe...
User is offlineProfile CardPM

Go to the top of the page

Louisda16th
post 15 Aug, 2006 - 07:12 AM
Post #4


 

Group Icon
Joined: 3 Aug, 2006
Posts: 1,790



Thanked 1 times

Dream Kudos: 755
My Contributions


Datatypes:
Boolean, Byte, Currency, Date, Double, Integer, Long, Single, String, Variant.

Control Structures:

1)
If (<condition>) Then
<statments>
else
<statements>
End If

2)
IIF(<condition>,<truestatements>,<falsestatements>)

Case Control:
Select Case(<expression>)
Case(<expression 1>)
<statements>
Case (<expression 2)
<statements>
.
.
.
Case(<expression n>)
<statements>
Case else
<statements>
End Select

This post has been edited by Louisda16th: 15 Aug, 2006 - 07:11 AM
User is offlineProfile CardPM

Go to the top of the page

Louisda16th
post 15 Aug, 2006 - 07:29 AM
Post #5


 

Group Icon
Joined: 3 Aug, 2006
Posts: 1,790



Thanked 1 times

Dream Kudos: 755
My Contributions


3) Loops

a)
For (<counter>) = <startvall> To <endval> Step <Increment/Decrement>
(<statements>)
Next (<counter>)

B )
Do While(<expression>)
<statements>
Loop

c)
Do
<statements>
Loop While(<expression>)

d)
Do Until(<expression>)
<statements>
Loop

e)
Do
<statements>
Loop Until(<expression>)

f)
While <expression>
<statements>
Wend


Operators:
Arithmetic:
+,-,*,/,Mod,^
Logical:
AND, NOT, OR XOR,IS,EQV,IMP,LIKE
&-(Concatenation)
Comparision:
=,<,>,<=,>=


Common Events
Activte
Click
Change
DblClick
KeyDown
KeyUp
KeyPress
GotFocus
LostFocus
MouseDown
MouseUp
MouseMove

This post has been edited by Louisda16th: 15 Aug, 2006 - 07:29 AM
User is offlineProfile CardPM

Go to the top of the page

skyhawk133
post 15 Aug, 2006 - 07:52 AM
Post #6


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,844



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


What color should the VB sheets be? I was thinking something kinda yellow/orange. no idea why though.
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 15 Aug, 2006 - 08:11 AM
Post #7


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,173



Thanked 33 times

Dream Kudos: 25
My Contributions


Great start, Louisda16th!
User is online!Profile CardPM

Go to the top of the page

Louisda16th
post 15 Aug, 2006 - 05:13 PM
Post #8


 

Group Icon
Joined: 3 Aug, 2006
Posts: 1,790



Thanked 1 times

Dream Kudos: 755
My Contributions


Thanx Amadeus (call me Ashwith). Heres smthin more:
Type declaration characters:
%-Integer
$-String
@-Currency
&-Long
#-Double
!-Single
Variable Declaration:
Dim/Static/Public <VarName> As <DataType>

Defining Constants:
Const <Name> = <Value> smile.gif

This post has been edited by Louisda16th: 16 Aug, 2006 - 05:14 AM
User is offlineProfile CardPM

Go to the top of the page

Louisda16th
post 15 Aug, 2006 - 05:23 PM
Post #9


 

Group Icon
Joined: 3 Aug, 2006
Posts: 1,790



Thanked 1 times

Dream Kudos: 755
My Contributions


Arrays:
Declaration(0 Based Indexing)
Dim <varname>(<MaxIndexVal>) As <DataType>

(User Defined Indexing)
Dim <Varname>(<MinIndexVal> To <MaxIndexVal>) As <DataType>

Dynamic Arrays
Dim <varname>() As <DataType>
Redim <varname>(MaxIndexVal>)

For Each Next Loop
This Shud be at the loops section. I 4got bout it:
For Each <element> In <Group>
<statements>
Next <element>

With Statement(Im not sure wat section this cms under)

With <objectname>
.<Property1> =<Value>
.<Property2> =<Value>
.
.
.<Propertyn> =<Value>
End With
User is offlineProfile CardPM

Go to the top of the page

skyhawk133
post 15 Aug, 2006 - 05:24 PM
Post #10


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,844



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


Alrighty, I think I can put all of that together, let me get all of the data put in the sheet and I'll post it tomorrow. Thanks a ton!!
User is offlineProfile CardPM

Go to the top of the page

Louisda16th
post 15 Aug, 2006 - 05:34 PM
Post #11


 

Group Icon
Joined: 3 Aug, 2006
Posts: 1,790



Thanked 1 times

Dream Kudos: 755
My Contributions


Well Im not sure if these can be included as part of a reference sheet but i put em cause they are (dats wat i think) used very often
Common Controls
Label, Textbox, CommandButton, PictureBox, Frame, CheckBox, ScrollBars, Timer, DriveListBox, DirectoryListBox, FileListBox,Shape,Line,Data control,Image,OLE,ADODC

Some Library Functions

String:
LCase, UCase, Len, Trim, LTrim, RTrim, Left, Right, Mid, InStr, Space, String, Str, Asc, Chr, StrReverse

Numeric:
Int, Fix, CInt, Sgn, Val, Rnd, Randomize, Format, Round

Date & Time:
Now, Date, Date$, Time, Time$, DatePart, Day, Month, Year, Hour, Minute, Second, Timer, DateAdd, DateDiff.

Math:
Abs, Atn, Cos, Exp, Log, Sin, Sqr, Tan

Miscellaneous:
Is..., VarType, InputBox, MsgBox
User is offlineProfile CardPM

Go to the top of the page

Louisda16th
post 15 Aug, 2006 - 05:41 PM
Post #12


 

Group Icon
Joined: 3 Aug, 2006
Posts: 1,790



Thanked 1 times

Dream Kudos: 755
My Contributions


Procedures:

[Private/Public] Sub <name> (<ArgumentList>)
<statements>
End Sub
Calling:
[Call] <name>

Functions:

[Private/Public] <Name>(<ArgumentList>) [As <Type>]

Modules:
Form Module
Standard Module
Class Module
User is offlineProfile CardPM

Go to the top of the page

3 Pages V  1 2 3 >
Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 10:52AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month