Professional Documents
Culture Documents
...
. v.b .
BASIC
Dartmouth 1963
..
:
26:
1983/8/5 :
07707797637 :
NEXT
NEXT
NEXT
NEXT
CONTINUE
OK
CONTINUE
Start :
Start > Programmes > Microsoft Visual Studio 6.0 > Microsoft
Visual Basic 6.0
:
...
:
Form1 ...
Twip 120
...
:View Code ...
.
:Menu Editor ...
.
:Lock Controls
... ...
:Paste .
:Properties .
:
9
Components :
Apply OK
ActiveX DLL Browse ..
10
...
Directory Forms
Directory Module ... Class Module
Form ...Form1
:
:
11
...
... Caption Form1 ...
Name
Categorized
... Alphabetic
... Name
..
: Pointer
.
PictureBox :
... .
Label : ...
...
Text Box :
Frame : Frame
.
Command Button :
.
12
Options .
Option Button : ...
.
Compo box :
ListBox : List
.
HScrolBar : ...
.
VScrollBar :
.
Timer :
.
DriveListBox : ListBox
.
dirListBox : ListBox
Folders .
FileListbox : Listbox
Files .
Shape : .
Line : .
Image :
. Picturebox
data:
.
13
.
..
13 :
:File
..Exe
:Edit
..
:View
...
:Project
Module ClassModule ..
:Format
LockControls
...
:Debug
StepInto StepOver StepOut
RunToCursor BreakPoints
...
14
..
:Query ..SQL
:Diagram SQL ..ORACLE
:Tools
AddProcedur
ProcedureAtributes
ID ..
:Add-Insert
..
:Window
..
:Help
MSDN
..
15
True
...
= False
...
False
...
...
Name
Appearance
AutoRedraw
BackColor
BorderStyle
Caption
ControlBox
Enabled
Font
ForeColor
Height
Left
MaxButton
MinButton
MouseIcon
MousePointer
Movable
Picture
RightToLeft
ShowInTaskBar
StartUpPositio
16
Top
Visible
Width
Window State
:
Object.Property = Style
Object Property
Style ..
<
17
>
><
=<
=>
Mod
Cos Tan
..
For.. Next
18
For X = 1 To 10 Step 2
Print X
Next X
End Sub
1
..9 7 5 3 1 :
:
X 1 10
For X = 1 To 10 Step 2 Print X
Next X ..
If Then
If
...
:
(1
(2
(3
(4
(5
:IF
.
:Then If
) (If .
:Else If
.
:ElseIf If
If End If ElseIf
.
:End If
.
..
19
:
Password
If Text1.Text = Ehab Ehab
Image1.Visible = True Then
Bibo
ElseIf Ehab Bibo
.Else
.
:IFF
If..Else:
Private Sub Command1_Click
X = Text1.Text
)"MsgBox IIf(X = 7, "X=7", "X<>7
End Sub
7 = 1
..
20
:
)(Private Sub Command1_Click
End Sub
:
Private
...
.Private
Sub Sub End Sub
... .
Command1
Command1
.
Click Click
End Sub )(
v.b
:
)(Private Sub Command1_Click
End
21
...
) (End
) ( Unload Me
.
End
Unload Me
22
End
Unload Me
:
)(Private Sub Timer1_Timer
Label1.Caption = Time
Label2.Caption = Date
System Label1 Label2
...
:
)Label1.Caption = DateAdd(Interval, Number, Date
23
Number Date
.. ..
:
)Date1 = DateAdd(M, 3, Date
:
)"Label1.Caption = DateDiff(Interval, "Date1", "Date2
Date1 Date2 Interval
M D
:
Label1.Caption = DateDiff("m", "14/7/1989", "26/4/2003") \ 12
Interval 1000
..
:
)Label1.Caption = Format (Date, YYYY
:
)Label2.Caption = Format (Date, MMMM
:
)Label3.Caption = Format (Date, MM
:
)Label4.Caption = Format (Date, DDDD
:
)Label5.Caption = Format (Date, DD
5 ...
24
..
Calendar = vbCalHijri
:
Calendar = vbCalGreg
:Len :
Dim Stl As Integer
)Stl = Len(String1
25
:
)Result = Trim(String1
:LTRim . :
)Result = LTrim(String1
:RTrim . :
)Result = Rtrim(String1
:Mid
:
)Result = Mid (String1, 2, 1
)( :chr AscII :
)Result = Chr(13
)( :ASC ASCII
:
Dim AscCode
)AscCode = Asc(E
)( :Str .
:
)Result = Str(5
26
)( :Val
:
Dim Number
)Number = Val(String1
: Mathematics Functions
: Abs
) (13- ) (13
..
)Number=Abs(-45.6
Text1.Text = Number
Number=45.6
Null Null
..
: Sqr
.
)Number=Sqr(25
Text1.Text = Number
.. Number=5
:Log
:
)Number=Log (20
27
..MyNumber=2.9957327
:Int
:
)Number=Int (332.54
Text1.Text = Number
MyNumber=332
:Atn ""
:
)( MyNumber=Atn
Text1.Text = MyNumber
:Tan
:
)( MyNumber=Tan
Text1.Text = My Number
:Cos
:
)( MyNumber=Cos
Text1.Text = MyNumber
28
:Sin
:
Number=Sin ()
Text1.Text = Number
29
Form
*
* Text
Command )(6
)(3
Caption
Form2
Command -1
Caption
30
Label
.
Private Sub Command6_Click()
Form2. show
31
Private Sub Command1_Click()
Text3. text = val (text1. text) + val (text2. text)
Private Sub Command3_Click()
Private Sub Command5_Click
dim x as String
dim y as String
x = text1.text
y = sqr (x)
text2.text =y
End Sub
32
if
*^*
Text )(2
Text ) (18
) Text2( .
33
34
35