SlideShare a Scribd company logo
1 of 34
‫المرئية‬ ‫البرمجة‬ ‫مقرر‬
‫الوحدات‬1-9
‫النصفي‬ ‫قبل‬ ‫ما‬ ‫الوحدات‬ ‫على‬ ‫متنوعة‬ ‫امثلة‬
‫االول‬ ‫اللقاء‬21/02/2015
‫أ‬.‫محمود‬‫خلوف‬
‫الثاني‬ ‫الفصل‬1142‫للعام‬2014/2015
• Do
• Print x
• x = x + 1
• Loop While x < 10
‫التحكم‬ ‫جمل‬
• While x < 10
• Print x
• x = x + 1
• Wend
‫التحكم‬ ‫جمل‬
• Do
• Print x
• x = x + 1
• Loop Until x = 10
‫التحكم‬ ‫جمل‬
• Do While x < 10
• Print x
• x = x + 1
• Loop
‫التحكم‬ ‫جمل‬
• For i = 1 To 10
• Print i
• Next i
‫التحكم‬ ‫جمل‬
• If av < 50 Then
• Print "pass"
• Else
• Print "fail"
• End If
‫التحكم‬ ‫جمل‬
• Select Case x
• Case Is >= 50: Print "pass"
• Case Is < 50: Print "fail"
• End Select
‫التحكم‬ ‫جمل‬
• Private Sub Command1_Click()
• a = 1
• b = 2
• Call add(a, b)
• Print a
• Print b
• End Sub
• Public Sub add(ByVal x As Integer, ByVal y As Integer)
• Print x + y
• X=5
• Y=10
• End Sub
‫ال‬‫و‬‫الد‬(‫بالقيمة‬ ‫التمرير‬ ‫طريقة‬)
• By Reference
• Private Sub Command1_Click()
• Dim a As Integer
• Dim b As Integer
• a = 1
• b = 2
• Call add(a, b)
• Print a
• Print b
•
• End Sub
• Public Sub add(x As Integer, y As Integer)
• Print x + y
• x = 10
• y = 5
• End Sub
‫ال‬‫و‬‫الد‬(‫بالمرجع‬ ‫التمرير‬ ‫طريقة‬)
• Function Call
• Private Sub Command1_Click()
• a = 1
• b = 2
• Print add(a, b)
• End Sub
• Public Function add(ByVal x As Integer, ByVal y As
Integer) As Integer
• add = x + y
• End Function
‫ال‬‫و‬‫الد‬
• Arrays
• One dimensional arrays
• Dim x(5) as integer
• 0 – 5 = 6
• Dim x(3 to 5) as integer
• 3 – 5 = 3
• Two dimensional arrays
• Dim x(2,2) as integer
• 3*3=9
• Dim x(2 to 5,3 to 7)
• 4*4=16
• Dim x(5) as integer
‫المصفوفات‬
• ReDim x(3) As Integer
• For i = 0 To 2
• x(i) = InputBox("enter no")
• Next i
• For i = 0 To 2
• Print x(i)
• Next i
• ReDim x(5) As Integer
• For i = 0 To 4
• Print x(i)
• Next i
• End Sub
• // preserve
‫المصفوفات‬
‫النقر‬ ‫حدث‬Click
‫ج‬‫المزدو‬ ‫النقر‬ ‫حدث‬Double Click
‫ة‬‫ر‬‫الفأ‬ ‫يك‬‫ر‬‫تح‬ ‫حدث‬Move
‫االفالت‬ ‫و‬ ‫السحب‬ ‫حدث‬Drag and Drop
‫إفالته‬ ‫و‬ ‫ة‬‫ر‬‫الفأ‬ ‫زر‬ ‫على‬ ‫الزر‬ ‫حدث‬
mousedown/mouseup
‫االحداث‬
Private Sub Command1_MouseMove(Button As
Integer, Shift As Integer, X As Single, Y As
Single)
TEXT1.BACKCOLOR = “VBGREEN”
End Sub
____________________________________Pri
vate Sub Form_MouseMove(Button As Integer,
Shift As Integer, X As Single, Y As Single)
text1 = “moving the mouse”
End
‫ة‬‫الفار‬ ‫تحرك‬ ‫حدث‬
‫الم‬ ‫قيم‬ ‫إلظهار‬ ‫البرمجي‬ ‫المقطع‬ ‫اكتب‬‫حور‬
‫الماوس؟‬ ‫تحرك‬ ‫عند‬ ‫الصادي‬‫و‬ ‫السيني‬‫؟‬
‫مثال‬
Private Sub Form_DragDrop(Source As
Control, X As Single, Y As Single)
PICTURE1.Move X, Y
End Sub
Private Sub Image1_MouseDown(Button As
Integer, Shift As Integer, X As Single, Y As
Single)
PICTURE1.Drag
End Sub
‫االفالت‬‫و‬ ‫السحب‬ ‫حدث‬
Private Sub Form_DblClick()
LABLE1.CAPTION=“DOUBLE
CLICKED"
End Sub
‫النقرتين‬ ‫حدث‬
Private Sub Form_KeyDown(KeyCode As Integer,
Shift As Integer)
TEXT1 =“THE KEY PRESSED IS” & Chr(KeyCode)
End Sub
--------------------------------------------------------------
Private Sub Form_KeyUp(KeyCode As Integer,
Shift As Integer)
TEXT1 = “THE KEY PRESSED IS” &Chr(KeyCode)
End Sub
‫افالته‬‫و‬ ‫المفتاح‬ ‫على‬ ‫الضغط‬ ‫حدث‬
‫ار‬‫و‬‫الح‬ ‫مربعات‬/‫ع‬‫النو‬ ‫اختيار‬
‫ار‬‫و‬‫الح‬ ‫مربعات‬/‫الزر‬ ‫قيمة‬
‫ار‬‫و‬‫الح‬ ‫مربعات‬/‫امثلة‬
Private Sub Command1_Click()
MsgBox "this is the first msgebox", vbOKCancel,
"msgbox1“
MsgBox "this is the second msgebox", 64,
"msgbox1“
MsgBox "this is the third msgebox", 5, "msgbox1“
MsgBox "this is the last msgebox", 3, "msgbox1“
End Sub
‫ار‬‫و‬‫الح‬ ‫مربعات‬/‫امثلة‬
• Private Sub Command1_Click()
• Dim S As Integer
• S = MsgBox("this is the first msgebox",
vbOKCancel, "msgbox1“")
• If S = 1 Then
• Print "oK"
• Else
• Print "NO"
• End If
• End Sub
OK = “OK”
CANCEL=“NO”
‫الشائعة‬ ‫ار‬‫و‬‫الح‬ ‫مربعات‬
• Private Sub Command1_Click()
• CommonDialog1.Action = ?
• CommonDialog1.ShowColor
• CommonDialog1.ShowFont
• CommonDialog1.ShowOpen
• CommonDialog1.ShowPrinter
• CommonDialog1.ShowSave
• End Sub
‫الشائعة‬ ‫ار‬‫و‬‫الح‬ ‫مربعات‬/‫مثال‬
• Private Sub Command1_Click()
• CommonDialog1.ShowColor
• Text1.BackColor =
CommonDialog1.Color
• End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
Private Sub Command1_Click()
Dim st1 As String
Dim st2 As String
Dim result As Integer
st1 = Text1.Text
st2 = Text2.Text
result = StrComp(st1, st2)
If result = 1 Then
Label4.Caption = "st1 is greater than st2"
ElseIf result = -1 Then
Label4.Caption = "st1 is less than st2"
ElseIf result = 0 Then
Label4.Caption = "st1 is equal to st2"
End If
End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
Private Sub Command2_Click()
Dim st1 As String
Dim st2 As String
Dim result As Integer
st1 = Text1.Text
st2 = Text2.Text
result = st1 Like st2
If result Then
Label4.Caption = "similar"
Else
Label4.Caption = "not similar"
End If
End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
Private Sub Command1_Click()
Dim st As String
Dim st1 As String
Dim st2 As String
st = Text1.Text
st1 = Text2.Text
st2 = Text3.Text
Label4.Caption = Replace(st, st1, st2)
End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
Private Sub Command1_Click()
Dim st As String
st = Text1.Text
Label1.Caption = StrReverse(st)
End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
• Private Sub Command1_Click()
• Text4 = WeekdayName(Weekday("3/8/2000"))
• End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
• Private Sub Command1_Click()
• Text4 = Mid("VISUALBASIC", 3, 2)
• End Sub
‫ة‬‫الجاهز‬ ‫ال‬‫و‬‫الد‬
• Text4 = Month(Now)
• Text4 = DAY(Now)
• Text4 = YEAR(Now)
• Text4 = Hour(Time)
• Text4 = MINUTE(Time)
• Text4 = SECOND(Time)
‫المؤقت‬ ‫استخدام‬
• TIMER
‫انتهى‬
‫اللقاء‬ ‫الى‬

More Related Content

What's hot (8)

Microsoft
MicrosoftMicrosoft
Microsoft
 
Keyboard shorcuts
Keyboard shorcutsKeyboard shorcuts
Keyboard shorcuts
 
Computer short cut key
Computer short cut keyComputer short cut key
Computer short cut key
 
Computer keyboard shortcuts
Computer keyboard shortcutsComputer keyboard shortcuts
Computer keyboard shortcuts
 
MS office shortcuts
MS  office shortcutsMS  office shortcuts
MS office shortcuts
 
Keyboard shortcuts
Keyboard shortcutsKeyboard shortcuts
Keyboard shortcuts
 
Keyboard shortcuts
Keyboard shortcutsKeyboard shortcuts
Keyboard shortcuts
 
More than 100 keyboard shortcuts In Computer
More than 100 keyboard shortcuts In Computer More than 100 keyboard shortcuts In Computer
More than 100 keyboard shortcuts In Computer
 

Viewers also liked

Viewers also liked (10)

اسئلة نهائية لمقرر البرمجة المرئية - 1337
اسئلة نهائية لمقرر البرمجة المرئية - 1337اسئلة نهائية لمقرر البرمجة المرئية - 1337
اسئلة نهائية لمقرر البرمجة المرئية - 1337
 
استعداد السفر
استعداد السفراستعداد السفر
استعداد السفر
 
مكتب ترجمه معتمد مدينه نصر
مكتب ترجمه معتمد مدينه نصرمكتب ترجمه معتمد مدينه نصر
مكتب ترجمه معتمد مدينه نصر
 
Arabi
ArabiArabi
Arabi
 
مكتب ترجمة معتمد في مدينة نصر
مكتب ترجمة معتمد في مدينة نصرمكتب ترجمة معتمد في مدينة نصر
مكتب ترجمة معتمد في مدينة نصر
 
ملخص البرمجة المرئية - 1377
ملخص البرمجة المرئية - 1377ملخص البرمجة المرئية - 1377
ملخص البرمجة المرئية - 1377
 
ملخص اللغة العربية 1
ملخص اللغة العربية 1ملخص اللغة العربية 1
ملخص اللغة العربية 1
 
50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...
50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...
50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...
 
Raffles Institute_Design past and present_Middle ages
Raffles Institute_Design past and present_Middle agesRaffles Institute_Design past and present_Middle ages
Raffles Institute_Design past and present_Middle ages
 
Translation passages 3rd year
Translation passages 3rd yearTranslation passages 3rd year
Translation passages 3rd year
 

More from جامعة القدس المفتوحة

More from جامعة القدس المفتوحة (20)

كتاب ميكروبيديا Micropedia
كتاب ميكروبيديا Micropediaكتاب ميكروبيديا Micropedia
كتاب ميكروبيديا Micropedia
 
كتاب: Simply AVR مقدمة مبسطة عن النظم المدمجة
كتاب: Simply AVR مقدمة مبسطة عن النظم المدمجةكتاب: Simply AVR مقدمة مبسطة عن النظم المدمجة
كتاب: Simply AVR مقدمة مبسطة عن النظم المدمجة
 
ملخص تحليل الانظمة وتصميمها - النصفي
ملخص تحليل الانظمة وتصميمها - النصفيملخص تحليل الانظمة وتصميمها - النصفي
ملخص تحليل الانظمة وتصميمها - النصفي
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
 
ملخص تحليل الانظمة وتصميمها - الوحدة الخامسة
ملخص تحليل الانظمة وتصميمها - الوحدة الخامسةملخص تحليل الانظمة وتصميمها - الوحدة الخامسة
ملخص تحليل الانظمة وتصميمها - الوحدة الخامسة
 
ملخص تحليل الانظمة وتصميمها - الوحدة الثالثة
ملخص تحليل الانظمة وتصميمها - الوحدة الثالثةملخص تحليل الانظمة وتصميمها - الوحدة الثالثة
ملخص تحليل الانظمة وتصميمها - الوحدة الثالثة
 
ملخص تحليل الانظمة وتصميمها - الوحدة الثامنة
ملخص تحليل الانظمة وتصميمها - الوحدة الثامنةملخص تحليل الانظمة وتصميمها - الوحدة الثامنة
ملخص تحليل الانظمة وتصميمها - الوحدة الثامنة
 
ملخص تحليل الانظمة وتصميمها - الوحدة السابعة
ملخص تحليل الانظمة وتصميمها - الوحدة السابعةملخص تحليل الانظمة وتصميمها - الوحدة السابعة
ملخص تحليل الانظمة وتصميمها - الوحدة السابعة
 
ملخص تحليل الانظمة وتصميمها - الوحدة الرابعة
ملخص تحليل الانظمة وتصميمها - الوحدة الرابعةملخص تحليل الانظمة وتصميمها - الوحدة الرابعة
ملخص تحليل الانظمة وتصميمها - الوحدة الرابعة
 
ملخص تحليل الانظمة وتصميمها - الوحدة التاسعة
ملخص تحليل الانظمة وتصميمها - الوحدة التاسعةملخص تحليل الانظمة وتصميمها - الوحدة التاسعة
ملخص تحليل الانظمة وتصميمها - الوحدة التاسعة
 
ملخص تحليل الانظمة وتصميمها - الوحدة الثانية
ملخص تحليل الانظمة وتصميمها - الوحدة الثانيةملخص تحليل الانظمة وتصميمها - الوحدة الثانية
ملخص تحليل الانظمة وتصميمها - الوحدة الثانية
 
ملخص تقنية تصميم صفحات الويب - الوحدة السادسة
ملخص تقنية تصميم صفحات الويب - الوحدة السادسةملخص تقنية تصميم صفحات الويب - الوحدة السادسة
ملخص تقنية تصميم صفحات الويب - الوحدة السادسة
 
ملخص تقنية تصميم صفحات الويب - الوحدة الخامسة
ملخص تقنية تصميم صفحات الويب - الوحدة الخامسةملخص تقنية تصميم صفحات الويب - الوحدة الخامسة
ملخص تقنية تصميم صفحات الويب - الوحدة الخامسة
 
اسئلة نهائية لمقرر تقنية تصميم صفحات الويب - 1266
اسئلة نهائية لمقرر تقنية تصميم صفحات الويب - 1266اسئلة نهائية لمقرر تقنية تصميم صفحات الويب - 1266
اسئلة نهائية لمقرر تقنية تصميم صفحات الويب - 1266
 
مناهج البحث العلمي - اللقاء الافتراضي الثاني
مناهج البحث العلمي - اللقاء الافتراضي الثانيمناهج البحث العلمي - اللقاء الافتراضي الثاني
مناهج البحث العلمي - اللقاء الافتراضي الثاني
 
مناهج البحث العلمي - شرح الوحدات 1-5
مناهج البحث العلمي - شرح الوحدات 1-5مناهج البحث العلمي - شرح الوحدات 1-5
مناهج البحث العلمي - شرح الوحدات 1-5
 
ملخص مناهج البحث العلمي كامل
ملخص مناهج البحث العلمي كاململخص مناهج البحث العلمي كامل
ملخص مناهج البحث العلمي كامل
 
ملخص مناهج البحث العلمي
ملخص مناهج البحث العلميملخص مناهج البحث العلمي
ملخص مناهج البحث العلمي
 
مناهج البحث العلمي - اللقاء الافتراضي الاول
مناهج البحث العلمي - اللقاء الافتراضي الاولمناهج البحث العلمي - اللقاء الافتراضي الاول
مناهج البحث العلمي - اللقاء الافتراضي الاول
 
ملخص تعايش مع التكنولوجيا
ملخص تعايش مع التكنولوجياملخص تعايش مع التكنولوجيا
ملخص تعايش مع التكنولوجيا
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 

امثلة متنوعة على الوحدات ما قبل النصفي