Professional Documents
Culture Documents
16 6
14
21
26
40
53
58
65
10
68
11
75
12
81
13
87
14
94
15
101
16
110
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
- 1
-:-------------------
) : (
:
. .1
.Form
.Text Box
.Label
.Command Button
.
.Val
.Visual Basic
.IF
.2
.3
.4
.5
-: ( Source Code)
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End Sub
Private Sub Command4_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub Command5_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub
Private Sub Command6_Click()
Text3.Text = Val(Text1.Text) Mod Val(Text2.Text)
End Sub
Private Sub Command7_Click()
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
1. Properties Of Form.
2. Properties Of Labels.
3. Properties Of Bottuns.
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
1. Properties Of Form1.
PROPERTIES OF FORM1
Alphabetic
Categorized
(Name)
Caption
Font
Form1
Calculator
Times New Roman
Font Style
Bold
Font Size
12
Black
ForeColor
2. Properties Of Labels.
PROPERTIES OF LABEL1
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
Label1
2-Center
The First Number
Times New Roman
Font Style
Bold
Font Size
12
Black
ForeColor
PROPERTIES OF LABEL2
Alphabetic
Categorized
(Name)
Alignment
Caption
Label2
2-Center
The Second
Number
Times New Roman
Font Style
Bold
Font Size
12
Black
Font
ForeColor
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
PROPERTIES OF LABEL3
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
Label3
2-Center
The Result
Times New Roman
Font Style
Bold
Font Size
12
Black
ForeColor
3. Properties Of TextBox.
PROPERTIES OF TEXT1
Alphabetic
Categorized
(Name)
Alignment
Font
Text1
2-Center
Times New Roman
Font Style
Bold
Font Size
16
Blue
ForeColor
Text
PROPERTIES OF TEXT2
Alphabetic
Categorized
(Name)
Alignment
Font
Text2
2-Center
Times New Roman
Font Style
Bold
Font Size
16
Blue
ForeColor
Text
PROPERTIES OF TEXT3
Alphabetic
Categorized
(Name)
Alignment
Font
Text3
2-Center
Times New Roman
Font Style
Bold
Font Size
16
Blue
ForeColor
Text
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Categorized
(Name)
Caption
Font
Command1
+
Times New Roman
Font Style
Bold
Font Size
16
PROPERTIES OF COMMAND3
Alphabetic
Categorized
(Name)
Caption
Font
Command3
Times New Roman
Font Style
Bold
Font Size
16
PROPERTIES OF COMMAND4
Alphabetic
Categorized
(Name)
Caption
Font
Command4
*
Times New Roman
Font Style
Bold
Font Size
16
PROPERTIES OF COMMAND5
Alphabetic
Categorized
(Name)
Caption
Font
Command5
/
Times New Roman
Font Style
Bold
Font Size
16
PROPERTIES OF COMMAND6
Alphabetic
Categorized
(Name)
Caption
Font
Command6
Mod
Times New Roman
Font Style
Bold
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Font Size
16
Properties of Command7
Alphabetic
Categorized
(Name)
Caption
Font
Command7
^
Times New Roman
Font Style
Bold
Font Size
16
PROPERTIES OF COMMAND2
Alphabetic
Categorized
(Name)
Caption
Font
Command2
E&xit
Times New Roman
Font Style
Bold
Font Size
16
PROPERTIES OF COMMAND8
Alphabetic
Categorized
(Name)
Caption
Font
Command8
&Clear
Times New Roman
Font Style
Bold
Font Size
16
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
- 2
-:------------------------
Form
Text Box
Label
Command Button
Text Box
Val
Visual Basic
If .. Then .. Else
( )Text Box .
:
Dim n1 As Single
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Dim n2 As Single
Dim op As String
Private Sub Command1_Click()
Text1.Text = (Text1.Text) + "1"
End Sub
Private Sub Command10_Click()
Text1.Text = (Text1.Text) + "8"
End Sub
Private Sub Command11_Click()
Text1.Text = (Text1.Text) + "9"
End Sub
Private Sub Command12_Click()
Text1.Text = (Text1.Text) + "0"
End Sub
Private Sub Command13_Click()
n1 = Val(Text1.Text)
op = "+"
Text1.Text = ""
End Sub
Private Sub Command14_Click()
n1 = Val(Text1.Text)
op = "/"
Text1.Text = ""
End Sub
Private Sub Command15_Click()
n1 = Val(Text1.Text)
op = "mod"
Text1.Text = ""
End Sub
Private Sub Command16_Click()
Text1.Text = ""
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
10
PROPERTIES OF FORM1
Alphabetic
Categorized
(Name)
Caption
Font
Form1
Calculator
Times New Roman
Font Style
Bold
Font Size
12
High Light
Black
Back Color
ForeColor
Text Box .2
11
:
Alphabetic
Categorized
(Name)
Alignment
Back Color
Font
Text1
0 Left Justify
High Light
Times New Roman
Font Style
Bold
Font Size
14
Text
Command Button .3
PROPERTIES OF COMMAND1
Alphabetic
Categorized
(Name)
Caption
Font
Command
1, 2, 3, 4, 5, 6, 7, 8, 9, 0
Times New Roman
Font Style
Bold
Font Size
14
PROPERTIES OF COMMAND1
Alphabetic
Categorized
(Name)
Caption
Font
Command
Exit, CE
Times New Roman
Font Style
Bold
Font Size
14
PROPERTIES OF COMMAND1
Alphabetic
Categorized
(Name)
Caption
Font
Command
*, /, +, -, ^, Mod, =
Times New Roman
Font Style
Bold
Font Size
14
PROPERTIES OF COMMAND1
Alphabetic
Categorized
(Name)
Command
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
12
:
Caption
Font
Calculator
Times New Roman
Font Style
Bold
Font Size
14
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
13
:
- 3
-:---------------( )
-:
.1 -:
-
Form
Text Box
Label
Command Button
Combo Box
Image
.2 If .. then ..else
.3 Select .. Case
-:--------------------- ,
:
14
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
:
Form .4
PROPERTIES OF FORM1
Alphabetic
Categorized
(Name)
Caption
Font
FrmEx
Money Changer
Times New Roman
Font Style
Bold
Font Size
12
High Light
Black
Back Color
ForeColor
Text Box .5
Categorized
(Name)
Alignment
Back Color
Font
TxtIn
2 - Center
High Light
Times New Roman
Font Style
Bold
Font Size
14
Text
Categorized
(Name)
Alignment
Back Color
Font
TxtOut
2 - Center
High Light
Times New Roman
Font Style
Bold
Font Size
14
Text
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
15
:
Combo Box .6
Categorized
(Name)
Back Color
Font
CboIn
Window Background
Times New Roman
Font Style
Bold
Font Size
14
France
Germany
Italy
list
Command Button
.7
PROPERTIES OF COMMAND1
Alphabetic
Categorized
(Name)
Caption
Font
Command1
How Many Dollars
Times New Roman
Font Style
Bold
Font Size
12
PROPERTIES OF COMMAND2
Alphabetic
Categorized
(Name)
Caption
Font
Command2
How Many Dollars
Times New Roman
Font Style
Bold
Font Size
12
PROPERTIES OF COMMAND3
Alphabetic
Categorized
(Name)
Caption
Font
Command3
How Many Dollars
Times New Roman
Font Style
Bold
Font Size
12
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
16
:
Label
.8
PROPERTIES OF LABEL
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
LblIn
2-Center
Times New Roman
Font Style
Bold
Font Size
12
Black
ForeColor
PROPERTIES OF LABEL2
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
Label2
2-Center
The Amount
Times New Roman
Font Style
Bold
Font Size
14
Black
ForeColor
PROPERTIES OF LABEL3
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
Label3
2-Center
The Country
Times New Roman
Font Style
Bold
Font Size
14
Black
ForeColor
PROPERTIES OF LABEL4
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
Label4
2-Center
The Result
Times New Roman
Font Style
Bold
Font Size
12
Black
ForeColor
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
17
:
Properties of label1
Alphabetic
Categorized
(Name)
Alignment
Caption
Font
Label1
2-Center
$
Times New Roman
Font Style
Bold
Font Size
14
Black
ForeColor
Picture Box .9
Categorized
(Name)
AutoSize
Visible
Picture
ImgIn
True
False
Micro Soft Visual
Studio, Common,
Graphics, Icons, Flags,
Choose Country Flag,
CTRUSA
Categorized
(Name)
AutoSize
Visible
Picture
ImgF
True
False
Micro Soft Visual
Studio, Common,
Graphics, Icons, Flags,
Choose Country Flag,
FLGFRAN
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
18
:
PROPERTIES OF PICTURE BOX
Alphabetic
Categorized
(Name)
AutoSize
Visible
Picture
ImgG
True
False
Micro Soft Visual
Studio, Common,
Graphics, Icons, Flags,
Choose Country Flag,
FLGGERM
Categorized
(Name)
AutoSize
Visible
Picture
ImgI
True
False
Micro Soft Visual
Studio, Common,
Graphics, Icons, Flags,
Choose Country Flag,
FLGITALY
Sourse Code
Private Sub Command1_Click()
If CboIn.Text = "France" Then
TxtOut.Text = Val(TxtIn.Text) * 0.2
LblIn.Caption = "FR"
ImgIn.Picture = ImgF.Picture
ElseIf CboIn.Text = "Germany" Then
TxtOut.Text = Val(TxtIn.Text) * 0.6
LblIn.Caption = "DM"
ImgIn.Picture = ImgG.Picture
ElseIf CboIn.Text = "Italy" Then
TxtOut.Text = Val(TxtIn.Text) * 0.1
LblIn.Caption = "IL"
ImgIn.Picture = ImgI.Picture
Else
MsgBox "Please Choose The Country From The List", vbCritical, "Error"
End If
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
19
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
20
:
- 4
-:---------------( )
: Frame Option Button Check Box -
-: Visual Basic
( ,) ,
( , ,) ( ).
:
21
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
:
100 )*(
200 )**(
300 )***(
400 )****(
500 )*****(
.1
. %50 .2
-: .3
50
100
200
. %10 .4
Dim X As Single
Private Sub Command1_Click()
Select Case CboStar.ListIndex
Case 0:
X = 100
Case 1:
X = 200
Case 2:
X = 300
Case 3:
X = 400
Case 4:
X = 500
Case Else
MsgBox "Choose how many stars", vbCritical, "Error"
Exit Sub
End Select
If OptParis.Value = True Then X = X * 1.5
If ChkBreak.Value = 1 Then X = X + 50
If ChkLunch.Value = 1 Then X = X + 100
If ChkDinner.Value = 1 Then X = X + 200
If OptCash.Value = True Then X = X * 0.9
TxtOut.Text = X
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
22
:
-:---------------- .
Form:
PROPERTIES OF FORM1
Categorized
Alphabetic
Form1
Hotel
Times New Roman
Font Style
Bold
Font Size
14
Black
)(Name
Caption
Font
ForeColor
PROPERTIES OF COMBOBOX
Categorized
Alphabetic
CboStar
*
**
***
****
*****
Choose the stars
)(Name
List
.Payment, Food
Frame
Text
Caption:
Place ,
,
( ),
.
23
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Option Button
,
.
: Food Option Button
Categorized
(Name)
Caption
Value
OptParis
Paris
True
Categorized
(Name)
Caption
Value
OptProv
Out
False
Categorized
(Name)
Caption
Value
OptCash
Cash
True
Categorized
(Name)
Caption
Value
OptCheq
Credit
False
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
24
:
PROPERTIES OF CHEK BOX
Alphabetic
Categorized
(Name)
Caption
Value
ChkBreak
Break Fast
1- Checked
Alphabetic
(Name)
Caption
Value
ChkLunch
Lunch
0 - Unchecked
Alphabetic
(Name)
Caption
Value
ChkDinner
Dinner
0 - Unchecked
(How
(TxtOut)
. Much)
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
25
:
- 5
-:------------------ :
( User Name )Password
:
Variables
procedure Static
Module
-:---------------------
26
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
toto
, :
,
.
, ()Form2
27
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Change
:
, Click
No. of Click
Click.:
Who is :
28
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
-:------------------- .1 .
.2 ,Form2 .Module
, .Project/Add Form
, .Project / Add Module
-:1 -
Project Explorer
-:2 - ,
, module .
-:3 - ,
Project Properties
29
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Project /
Startup Object
- : .3
FORM1 PROPERTIES
Name
FrmLogin
BorderStyle 3-FixedDialoag
Caption
Login
MinButton
False
FORM2 PROPERTIES
Name
FrmVar
BorderStyle 2-Sizable
Caption
Variables
MinButton
True
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
30
- : Border Style ,
.4
(2-Sizable)
. ) (3-FixedDialog .
.5 MinButton .
.6
) (TextBox
-:
TEXTBOX PROPERTIES
TxtUserName
Name
PasswordChar
Text
TEXTBOX PROPERTIES
TxtPassword
Name
* PasswordChar
Text
.7 :PasswordChar
( *).
.8 :
COMMANDBUTTON
31
CmdOk
Name
False
Cancel
Ok
Caption
True
Default
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
CommandButton
.9
CmdCancel
Name
True
Cancel
Cancel
Caption
False
Default
:Cancel
Cancel .ESC
.10 : Default
, .Enter
.11
Label
Caption
.
.12 . Text1, Text2
.13
caption :
32
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
VariableName Type ,
,
, :
INTEGER
Long
Single
Double
String
String
Dim s As String
S ,
Change
33
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Dim ,
,
. No. of Click
, .
Dim
. .
n :
Dim n As Integer
:Click
()Private Sub Command2_Click
n=n+1
End Sub
.16 -: No. of Click
Msgbox :
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Click
, Ok
.
Static
Procedure
. :
Static i As Integer
.18 Form Show .Hide
FrmVar :
FrmVar.Show
Me . :
Me.Hide
.
.19 -: SetFocus . :
txtPassword.SetFocus
( )txtPassword
.20 SendKeys
,
"}SendKeys "{Home}+{End
Home , End Shift
.
Ok :
)(Private Sub CmdOk_Click
Static i As Integer
i=i+1
UserName = TxtUserName.Text
If TxtPassword = "toto" Then
35
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Me.Hide
FrmVar.Show
Else
If i = 3 Then
MsgBox "Finished your try", vbCritical, "Entrance"
End
Else
MsgBox "Try again, it's Wrong", vbExclamation, "Error"
TxtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End If
End Sub
: : Cancel .21
Private Sub CmdCancel_Click()
End
End Sub
:Who is .22
Who is
. , txtUserName
,
, Ok
. Who is
Module
-: Public
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
36
37
FrmVar.Show
Else
If i = 3 Then
MsgBox "Finished your try", vbCritical, "Error"
End
Else
MsgBox "Try again, it's Wrong", vbExclamation, "Error"
TxtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End If
End Sub
Dim n As Integer
38
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
39
:
- 6
-:-------------------
-:
.
For .. Statement
Do .. While Statement
Do .. Until Statement
)(Printer
-:----------------- :
40
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
(Multi Table 5) 5
5 * 10 .50
Multi table
.
Printer
Clear ,
Exit
.
-:-------------- . Caption -:Without, For, Do While, Do Until, Multi table 5, Multi Table, Printer, Clear,
Exit.
- : Cls . -:Print . -:Me . FontSize . ForeColor . ) QBColor(Color_Number Long ,Number_color 0 15 :
41
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
0
BLACK
GRAY
Blue
Light Blue
Green
10
Light Green
Cyan
11
Light Cyan
Red
12
Light Red
Magenta
13
Light Magenta
Yellow
14
Light Yellow
White
15
Bright White
15 0 WithOut
. 10
Private Sub Command1_Click()
Me.Cls
Me.FontSize = 10 + 0
Me.ForeColor = QBColor(0)
Me.Print 0
Me.FontSize = 10 + 1
Me.ForeColor = QBColor(1)
Me.Print 1
Me.FontSize = 10 + 2
Me.ForeColor = QBColor(2)
Me.Print 2
Me.FontSize = 10 + 3
Me.ForeColor = QBColor(3)
Me.Print 3
Me.FontSize = 10 + 4
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
42
Me.ForeColor = QBColor(4)
Me.Print 4
Me.FontSize = 10 + 5
Me.ForeColor = QBColor(5)
Me.Print 5
Me.FontSize = 10 + 6
Me.ForeColor = QBColor(6)
Me.Print 6
Me.FontSize = 10 + 7
Me.ForeColor = QBColor(7)
Me.Print 7
Me.FontSize = 10 + 8
Me.ForeColor = QBColor(8)
Me.Print 8
Me.FontSize = 10 + 9
Me.ForeColor = QBColor(9)
Me.Print 9
Me.FontSize = 10 + 10
Me.ForeColor = QBColor(10)
Me.Print 10
Me.FontSize = 10 + 11
Me.ForeColor = QBColor(11)
Me.Print 11
Me.FontSize = 10 + 12
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
43
Me.ForeColor = QBColor(12)
Me.Print 12
Me.FontSize = 10 + 13
Me.ForeColor = QBColor(13)
Me.Print 13
Me.FontSize = 10 + 14
Me.ForeColor = QBColor(14)
Me.Print 14
Me.FontSize = 10 + 15
Me.ForeColor = QBColor(15)
Me.Print 15
End Sub
:
Me.FontSize = 10 + i
Me.ForeColor = QBColor(i)
Me.Print i
15
, Visual Basic
.
For : For
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
44
][statements
]Next [counter
.
-:
Counter . Start . End . Step -
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Do While Do .. While :
Do While Condition
][Statement
][Statement
Loop
Visual Basic
Condition False
Loop
Do While
True
false ,
True . False
-:
)(Private Sub Command3_Click
Dim i As Integer
Me.Cls
Do While i <= 15
Me.FontSize = 10 + i
)Me.ForeColor = QBColor(i
Me.Print i
i=i+1
Loop
End Sub
46
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Do Until : Do .. until
Do until condition
[statements]
[statements]
Loop
. Visual Basic
.
Private Sub Command4_Click()
Dim i As Integer
Me.Cls
i=0
Do Until i = 15
Me.FontSize = 10 + i
Me.ForeColor = QBColor(i)
Me.Print i
i=i+1
Loop
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
47
-:
Multi table 5 -
. . For ,
Private Sub Command5_Click()
Me.Cls
Dim i As Integer
Me.FontSize = 12
Me.ForeColor = QBColor(0)
For i = 1 To 10
Me.Print i & " * 5 = " & i * 5
Next i
End Sub
, -:
Multi Table
. .
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
48
:
:
)(CurrentX, CurrentY
X CurrentX
width
CurrentY .Height
Twip
VB 576
800
500 .
:
,
i j
i . :
)(Private Sub Command6_Click
Dim i As Integer, j As Integer
Me.Cls
Me.FontSize = 10
For i = 1 To 10
)Me.ForeColor = QBColor(i
For j = 1 To 10
Me.CurrentX = 800 * i
Me.CurrentY = 500 * j
Me.Print j & " * "; i & " = " & i * j
Next j
Next i
End Sub
49
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
- -:
, ,
-:
.
Printer ,
, Printer
, Printer
.
50
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Printer
CurrentX
CurrentY
FontName
FontSize
FontCount
)Fonts (n
0FontCount-1
1 :2 Portrait
Orientation
Landscape
Printer
Pset (X,Y),C
printPicture
EndDoc
Clear
)(Private Sub Command9_Click
Me.Cls
End Sub
51
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Exit -
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
52
:
- 7
-:--------------------
( : , , , , )
:
.
.
.
.
.
:
:
53
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
-:--------------: ,
FORM1 PROPERTIES
Name
Graphics_1
BorderStyle
2-Sizable
Caption
Graphic Applications
BackColor
White Green
Height
8400
Width
10240
Window State
0 Normal
: Command Buttons
COMMAND BUTTONS 1
Name
Point
BackColor
Orange
Caption
Point
COMMAND BUTTONS 2
Name
CmdRandPoint
BackColor
Orange
Caption
Random Point
COMMAND BUTTONS 3
Name
CmdLine
BackColor
Orange
Caption
Line
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
54
:
command Buttons 4
Name
CmdCircle
BackColor
Orange
Caption
Circle
COMMAND BUTTONS 5
Name
Command1
BackColor
Orange
Caption
Random Circle
COMMAND BUTTONS 6
Name
CmdClear
BackColor
Orange
Caption
Clear
COMMAND BUTTONS 7
Name
CmdExit
BackColor
Orange
Caption
Exit
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
55
:
:
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
56
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
57
:
- 8
-:---------------------
( , , )
-:-------------------- :
58
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
-:--------------------------
Visual Basic
, ,
Basic
TWIP
Visual
1440
,TWIP
:
TWIP
1440 TWIP
POINTS
72 POINTS
PIXELS
, PIXELS
Resolution
CHARACTER
INCHES
MILIMETERS
CENTIMETERS
59
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Scale Mode
:
PSet
.
:
Pset (x, y), Color
x .
y .
Color )QBColor(i
i 0 15 :
60
10
11
12
13
14
15
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Rnd .Random
Line
:
Line
Box
, :
Line (x1, y1) - (x2, y2), QBColor(i), B
BF F Filled
: Circle , :
)Circle (x, y), Radius, QBColor(i
Radius .
FillStyle
,
:
Solid
Transparant
Horizontal Lines
Vertical Lines
61
Cross Hatch
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
DrawStyle
,
:
Solid
Dash
Dot
Dash Dot
Transparant
Inside Solid
DrawWidth
,
.
:
62
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
63
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
64
:
- 9
-:------------------- : Speed
65
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
-:----------------------:
FORM1 PROPERTIES
Name
Form1
BorderStyle
2-Sizable
Caption
Speed
White Green
BackColor
Height
6480
Width
8925
Window State
0 Normal
: Text Box
TEXT BOX1
Name
TxtSpeed
Alignment
2 Center
BackColor
Orange
Text
HSpeedScroll HScrollBar
Exit Command Button
: Text Box
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
66
:
:
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
67
:
- 10
-:----------------( )
:
Do .. While
For ,
-:----------------------- :
:
,
Ok .
68
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
,
Years .
-:-------------------------- .
Shape ,
.
Shape ,
:
0 - RECTANGLE
1 Square
2 Oval
3 Circle
4 Rounded Rectangle
5 Rounded Square
FORM1 PROPERTIES
Form1
Name
2-Sizable
BorderStyle
Benefit
Caption
White Green
69
BackColor
7710
Height
11025
Width
0 Normal
Window State
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Shape
:
: Shape
SHAPE
Name
Shape1
Shape
4 Rounded Rectangle
SHAPE
Name
Shape2
shape
4 Rounded Rectangle
(TxtRate)
(TxtAmount)
: . ( TxtOut) (TxtYears)
TEXT BOX
Name
TxtAmount
Text
TEXT BOX
Name
TxtRate
Text
TEXT BOX
Name
TxtYears
Text
TEXT BOX
Name
TxtOut
Text
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
70
:
Ok .
) (TxtAmount1 ) (TxtRate1
) (TxtYears1 ) (TxtOut1 .
TEXT BOX
TxtAmount1
Name
Text
TEXT BOX
TxtRate1
Name
Text
TEXT BOX
TxtYears1
Name
Text
TEXT BOX
TxtOut1
Name
Text
Command Button
Years
.
Labels .Caption
:Ok
,
( ) .
100 10 5 :
71
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
110 =10+100
10=100\10*100
100
121=11 +110
11 =100\10*110
110
133,1=12,1+121
12,1=100\10*121
121
146,41=13,31+133,1
13,31=100\10*133,1
133,1
161,051=14,641+146,41 14,641=100\10*146,41
146,41
:
.100 \
+ =
( , For
.)
: Ok
Private Sub Command1_Click()
Dim a As Single
Dim r As Single
Dim y As Integer
Dim b As Single
Dim i As Integer
a = Val(TxtAmount.Text)
r = Val(TxtRate.Text)
y = Val(TxtYears.Text)
b=a
For i = 1 To y
b = b + b * r / 100
Next i
TxtOut.Text = b
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
72
:
: Years
,
,
,
.For
Do .. While
,
.
:Years
)(Private Sub Command2_Click
Dim a As Single
Dim r As Single
Dim y As Integer
Dim b As Single
)a = Val(TxtAmount1.Text
)r = Val(TxtRate1.Text
)b = Val(TxtOut1.Text
y=0
Do While a < b
a = a + a * r / 100
y=y+1
Loop
TxtYears1.Text = y
End Sub
Command Button 3 Clear
:
73
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
74
:
- 11
-:----------------------( )
-:
Factorial
-:------------------ :
75
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
:
.1 Factorial
.2 Primary or not
.3 Simple Multiple
.4 Max Divider
-:------------- .
.
Factorial
1n * ... * 3 * 2 * 1 : n
n
1
1 For
.n
:
)(Private Sub Command1_Click
Dim n As Integer
Dim nf As Double
Dim i As Integer
)n = Val(Text1.Text
nf = 1
For i = 1 To n
nf = nf * i
Next i
Text2.Text = nf
End Sub
76
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Primary No
( ).
n 2n 1
2 n - 1 .
n 2 n 1 n .
Primary No.
)(Private Sub Command2_Click
Dim n As Integer
)n = Val(Text3.Text
Dim i As Integer
Option1.Value = True
For i = 2 To n - 1
If n Mod i = 0 Then
Option1.Value = False
Exit For
End If
Next i
End Sub
Simple Multiple
( )
12 6 4
:
77
n, m
max
For i max to n*m
i n, m
i m n
Exit For
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Simple Multiple
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
78
:
: Max Divider
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
79
:
Exit
:
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
80
:
- 12
-:-----------------------( )
:
.
InputBox
MsgBox
.
-:-------------------- .
toto
Enter :
81
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Ok
Cancel ,
Retry .
,
.
Exit
:
No , Yes
.
-:------------------- : InputBox
Ok Cancel String
, :
)]InputBox(Prompt[,title][,Default][,xpos][,ypos][,helpfile,context
82
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Prompt .
Title .
Default .
Xpos, Ypos .
Helpfile, context .
InputBox :
)"P = InputBox("Enter Password: ", "Password
Ok Enter InputBox
,
Cancel
, :
MsgBox ,
,
Integer .
:
)]MsgBox(Prompt[,buttons][,title][,helpfile,context
:
Prompt .
Title .
Helpfile, context .
83
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
: Buttons
.
( Yes, No, Cancel) :
: ,
vbQuestion + vbYesNoCancel + vbDefaultButton2
:
R = MsgBox("Sure to Exit", vbQuestion + vbYesNoCancel +
vbDefaultButton2, "Exit")
VBQUESTION
vbExclamation
vbCritical
vbInformation
MsgBox
VBOKONLY
OK
vbOKCancel
OK, Cancel
vbAbortRetryIgnore
vbYesNoCancel
vbYesNo
Yes, No
vbRetryCancel
Retry, Cancel
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
84
VBDEFAULTBUTTON1
VbDefaultButton2
VbDefaultButton3
.
, Form_Load
.
.
Cancel
.
.
:
Private Sub Form_Load()
Dim P As String
Dim R As Integer 'Retry or Cancel
Dim i As Integer
Do While True
i=i+1
P = InputBox("Enter Password: ", "Password")
If P = "toto" Then Exit Do
If P = "" Then End
If i = 3 Then End
R = MsgBox("Wrong Password", vbQuestion + vbRetryCancel
vbDefaultButton1, "Error")
'R = MsgBox("Wrong Password", vbExclamation + vbRetryCancel
vbDefaultButton1, "Error")
'R = MsgBox("Wrong Password", vbCritical + vbRetryCancel
vbDefaultButton1, "Error")
'R = MsgBox("Wrong Password", vbInformation + vbRetryCancel
vbDefaultButton1, "Error")
If R = vbCancel Then End
Loop
, Form_Load
+
+
+
+
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
85
:
Exit
,
. No Yes
.Yes
Exit
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
86
:
- 13
-:---------------------
:
.
.
( .)
.
.
( ) .
-:-------------------- :
87
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
, (
) Average (Max)
) (MIN .
(Color) ,
) (Ordered .
-:-------------- .
( )10 ):(Text Box
)M(0), M(1), M(2), , M(9
: , ,
) (Index .
) (For .
,
) (Copy . (Paste) :
, ) (M ( Index
) (M ).)Edit/Copy - (Paste)
) ,(Edit/Paste
Yes or No :
You already have a control named M
?Do you want to create a control array
No ).(M -
Yes
) (Index
.
-
) (M ))Copy/Paste
(Index) ( ,)1
) M(9 .
88
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
M(0) TEXT BOX
M
Name
Index
Text
Name
Index
Text
Name
Index
Text
) (Average ).(TxtAvg
) ,(Max ).)TxtMax
) (Min ).(TtMin
.(Color)
). (Ordered
)(Average
( )Average
. ) )Avg ,
. 9
89
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
For
, 9
:
Count
.
For ,M.count = 10 10
. ,M.Count-1
:
Private Sub Command1_Click()
Dim i As Integer
Dim Avg As Single
Avg = 0
For i = 0 To M.Count - 1
Avg = Avg + Val(M(i).Text)
Next i
TxtAvg.Text = Avg / M.Count
End Sub
Max
:
.Max .Max Max : Max
Private Sub Command2_Click()
Dim i As Integer
Dim Max As Single
Max = Val(M(0))
For i = 1 To M.Count - 1
If Val(M(i)) > Max Then
Max = Val(M(i))
End If
Next i
TxtMax.Text = Max
End Sub
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
90
:
Min
: Min ,
Private Sub Command3_Click()
Dim i As Integer
Dim Min As Single
Min = Val(M(0))
For i = 1 To M.Count - 1
If Val(M(i)) < Min Then
Min = Val(M(i))
End If
Next i
TxtMin.Text = Min
End Sub
Color
Mod 2
.
Color
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
91
:
Ordered
:
. ( ) ,
.
. ( ) .
.
For For i=0 to M.Count-1
For j=i+1 to M.Count
I , j I
i+1 .
- Ordered :
92
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
:
93
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
- 14
-:---------------------
-:
.Timer
.
. Static
.Scroll Bars
.Rnd
-:-------------------- ,
( ) . .
94
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Round Earth ,
,
, .Right/Left
-:--------------- .
.
) (Moon Image:
Name
Index
Icon
Picture
Name
Index
Icon
Picture
Name
Index
Icon
Picture
Moon :
C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Elements
( ) .ImgMoon
95
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Timer Interval 500 .
Timer .
Interval ,
. ( 1000 ,
, ,
65535 .
: ,
500 ,
:
)Me.BackColor = QBColor(15*Rnd
.
Rnd ,
QBColor
ImgMoon :
Moon(0) .ImgMoon
) Moon(1.ImgMoon
) Moon(2.ImgMoon
) Moon(7
) , Moon(0 Static I ,
I .
96
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
:
Round Earth
:
ImgEarth
Moon ,
,False :
97
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
= Visible
Right/Left
, Right
:
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
98
:
VSCROLL1 VSCROLLBAR
VScroll1
Name
10000
Max
Min
500
Value
99
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
100
:
- 15
-:---------------------
.Sub
.Function
-:-------------------- , Form2
, :
101
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
No Sub ,
102
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Call Sub ,
, , Find
.
, Find
( ) :
-:--------------- .
.
.
No Sub :
103
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
MsgBox
, .
No Sub :
)(Private Sub Command3_Click
Dim c As Long
c = Me.BackColor
Me.BackColor = vbRed
"MsgBox "Test Form1 : WithOut Sub", vbCritical, "Error
Me.BackColor = c
End Sub
No Sub :
:
MyError
,
.
,
MyError
,
.
,
.
104
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
( )Events ,
, ,
,
Sub .Function
Sub
])[Public| Privates] Sub name [(arglist
][statements
][Exit Sub
][statements
End Sub
:
Public , (
).
Private , (
).
Name .
Statements .
Exit Sub ( ).
Arglist , ( ),
, ,
:
][By Val]|By Ref] varname[()] [As type
:
By Val , .
By Ref ,
( ).
105
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
Varname , () ) . (Array
, (
).
Type :
) (Integer, Long, Single, Double, Currency, String,
Variant , Object Type ,
variant .
][Call] nme [argumentlist
Name .
Argmentlist .
Call , )(
.
: Module
, .
:
Project/Add Module
, .
Module1
) , (.bas
MyError .
:
F as Form .
S As String .
)Sub MyError(f As Form, s As String
Dim c As Long
c = f.BackColor
f.BackColor = vbRed
"MsgBox s, vbCritical, "Error
f.BackColor = c
End Sub
106
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
Call Sub :
Form1
, MyError
Call Sub
MyError Form2 .
)(Private Sub Command2_Click
)Call MyError(Form2, Test Form2: with Sub
End Sub
DateDay Module2
Function
:
])[Public| Private] Function name [(arglist
][statements
][name = expression
][Exit Function
][statements
][name = expression
End Function
.
:
.
.
, .
, ,
DateDay .Module2
107
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
. Text2
: Find
Private Sub Command1_Click()
If IsDate(Text1.Text) = True Then
Text2 = DateDay(Text1.Text)
Else
Text2 = "Error"
End If
End Sub
True expr VB IsDate(expr)
. False
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
108
:
DueDate :Module2
DueDate ( ) ( ) :
, : , . - , .
) Month(Date Date .
) DateSerial(year, month, day VB year month
, day .
DueDate Find :
( Text1 ) .
Find Text2 ( ).
Find , DueDate Text1.Text
.Text2
Text1
, Isdate .Text2
Find :
)(Private Sub Command1_Click
If IsDate(Text1.Text) Then
)Text2 = DueDate(Text1.Text
Else
"Text2 = "Error
End If
End Sub
109
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
- 16
-:-------------------------
:
Add
Search
Delete
Display
Ordere
-:-------------------- , :
110
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
-:--------------.
:
Data1
Table1
Visible
False
: TextBox1
DATA FIELD
ID
Data Source
Data1
Text
: TextBox2
DATA FIELD
NAME
Data Source
Data1
Text
: TextBox3
DATA FIELD
GENDER
Data Source
Data1
Text
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
111
:
: TextBox4
DATA FIELD
AGE
Data Source
Data1
Text
: TextBox5
DATA FIELD
ADDRESS
Data Source
Data1
Text
: TextBox6
DATA FIELD
SALARY
Data Source
Data1
Text
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
112
:
:
:
COLS
Data1
DataSource
113
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
: Next : Next
: First Record
:Last Record
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
114
:
:( Add) :Add
Save
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
115
, Count
: Count
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
116
:
: : Find Previous
:Find Next
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
117
:Ordered Min
:
Private Sub Command14_Click()
On Error Resume Next
Data1.RecordSource = " select * from table1 order by salary "
Data1.Refresh
End Sub
Search :Search salary
: Salary
: Search Name
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
118
119
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833
:
:
120
felah_najar2000@yahoo.com
fallahnajjar@yahoo.com
+9647807445833