Programming Reference Sheets: Visual Basic

  • (2 Pages)
  • +
  • 1
  • 2

28 Replies - 10635 Views - Last Post: 24 August 2006 - 08:40 AM Rate Topic: -----

#1 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1812
  • View blog
  • Posts: 20,232
  • Joined: 17-March 01

Programming Reference Sheets: Visual Basic

Posted 14 August 2006 - 10:19 AM

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!
Is This A Good Question/Topic? 0
  • +

Replies To: Programming Reference Sheets: Visual Basic

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 415
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Programming Reference Sheets: Visual Basic

Posted 14 August 2006 - 10:24 AM

Will this be a VB.NET ref sheet or VB6?
Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1812
  • View blog
  • Posts: 20,232
  • Joined: 17-March 01

Re: Programming Reference Sheets: Visual Basic

Posted 14 August 2006 - 10:32 AM

Let's go with VB6 as that is what is still taught in most schools I believe...
Was This Post Helpful? 0
  • +
  • -

#4 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 08:12 AM

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 August 2006 - 08:11 AM

Was This Post Helpful? 0
  • +
  • -

#5 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 08:29 AM

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 August 2006 - 08:29 AM

Was This Post Helpful? 0
  • +
  • -

#6 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1812
  • View blog
  • Posts: 20,232
  • Joined: 17-March 01

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 08:52 AM

What color should the VB sheets be? I was thinking something kinda yellow/orange. no idea why though.
Was This Post Helpful? 0
  • +
  • -

#7 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 09:11 AM

Great start, Louisda16th!
Was This Post Helpful? 0
  • +
  • -

#8 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 06:13 PM

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> :)

This post has been edited by Louisda16th: 16 August 2006 - 06:14 AM

Was This Post Helpful? 0
  • +
  • -

#9 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 06:23 PM

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
Was This Post Helpful? 0
  • +
  • -

#10 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1812
  • View blog
  • Posts: 20,232
  • Joined: 17-March 01

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 06:24 PM

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!!
Was This Post Helpful? 0
  • +
  • -

#11 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 06:34 PM

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
Was This Post Helpful? 0
  • +
  • -

#12 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 06:41 PM

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
Was This Post Helpful? 0
  • +
  • -

#13 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Post icon  Posted 15 August 2006 - 06:48 PM

Error Handling

On Error Statement:

On Error Goto <LineNumber>
On Error Goto <Label>
On Error Resume Next

Err Object:
Properties:
Number
Source
Description

Methods:
Clear
Raise

Error Object:
Properties:
Description
Number
Source
SQLState
NativeError

Leaving Error Handlers:
Resume
Resume Next
Exit Sub/Function/Property
End Sub/Function/Property
Err.Raise

(dat kinda wraps up all I know. theres also Database systems which i had to learn in school but it wont fit in) :)

This post has been edited by Louisda16th: 15 August 2006 - 06:52 PM

Was This Post Helpful? 0
  • +
  • -

#14 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1812
  • View blog
  • Posts: 20,232
  • Joined: 17-March 01

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 06:53 PM

We'll be doing an advanced one once I get all the basic ones done... we can fit the more advanced stuff in those :) Thanks again for all the hard work!
Was This Post Helpful? 0
  • +
  • -

#15 Louisda16th  Icon User is offline

  • dream.in.assembly.code
  • member icon

Reputation: 15
  • View blog
  • Posts: 1,967
  • Joined: 03-August 06

Re: Programming Reference Sheets: Visual Basic

Posted 15 August 2006 - 08:05 PM

View Postskyhawk133, on 15 Aug, 2006 - 09:22 PM, said:

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

About da colours, i guess its fine if its light. orange looks gud i guess.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2