mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
E
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
E
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﺑﻤﺸﻴﺌﺔ اﷲ ﺗﻌﺎﻟﻰ
( ))ﺑﺴﻬﻮﻟﺔ وﻳﺴﺮ(( )اﻟﺘﻌﻠﻴﻢ اﻟﻤﺒﺎﺷﺮ٢٠١٠ ﺗﻌﻠﻢ ﻓﻴﺠﻮال ﺑﻴﺴﻴﻚ دوت ﻧﺖ
، ٠١١١٧٣٧٧٦٧٦ () ﻣﺼﺮي
ﻣﺤﻤﺪ ﺑﺪﻭﻱ ﻣﺤﻤﺪ ﺑﺪﻭﻱ ﺍﻟﻐﻮﻝ:ﻟﻠﻤﻬﻨﺪس
!
()
A !
( )
A
. ()
r () اﻟﻠﺬان وﻗﻔﺎ ﻣﻌﻲ ﺟﻨﺒﺎ إﻟﻰ ﺟﻨﺐ...ان
c
mmbadweym@yahoo.com
(
(
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﻟﻤﻦ ﺍﻟﻜﺘﺎﺏ :؟؟؟؟؟
ﺍﻟﺘﻌﺮﻳﻒ ﺑﺎﻟﻜﺎﺗﺐ :؟؟؟؟؟
mmbadweym@yhaoo.com
ﻓـــــــــــــــــــــــــﻲ ﺍﻟـــــــــــــــــــــــــﺪﻭﻝ ﺍﻟﻌﺮﺑﻴـــــــــــــــــــــــــﺔ ﺑﺎﻹﺿــــــــــﺎﻓﺔ ﻣــــــــــﺪﺭﺏ ﻣﺘﻌــــــــــﺎﻭﻥ ﻋــــــــــﻦ ﻃﺮﻳــــــــــﻖ ﺍﻹﻧﺘﺮﻧــــــــــﺖ
ﺍﻟﻤﻬــــــﺎﺭﺍﺕ ﺍﻟﻤﻜﺘﺒﻴــــــﺔ
ﺍﻟﺘﺼـــــﻤﻴﻢ ﻭﺍﻟﺠﺮﺍﻓﻴـــــﻚ ﺍﻟﺪﻋﺎﻳﺔ ﻭﺍﻹﻋـﻼﻥ ﺍﻟﻤﻄﺒﻮﻋـﺎﺕ
ﺍﻟﻮﺳــــــــــﺎﺋﻂ ﺍﻟﻤﺘﻌــــــــــﺪﺩﺓ
ﺍﻟﻄﺒﺎﻋــﺔ ﺍﻟﺴــﺮﻳﻌﺔ ﻋﺮﺑــﻲ ﻭﺇﻧﺠﻠﻴــﺰﻱ ﺍﻟﺘﻄﺒﻴﻘـــــﺎﺕ ﺍﳴﻜﺘﺒﻴـــــﺔ ﺍﳴﺘﻄـــــﻮﺭﺓ ﺷـــــﻬﺎﺩﺓ ﺍﻹﻧﻧـــــﺖ ﻭﺍﻟﺤﺎﺳـــــﻮﺏ ﺍﻟﺮﺧﺼــﺔ ﺍﻟﺪﻭﻟﻴــﺔ ﻟﻘﻴــﺎﺩﺓ ﺍﻟﺤﺎﺳــﻮﺏ ﺩﺑﻠﻮﻡ ﺗﻘﻨﻴﺔ ﺍﳴﻌﻠﻮﻣﺎﺕ ) ﻛﺎﻣﻳـﺪﺝ ( ﻣﺎﻳﻜﺮﻭﺳــــﻮﻓﺖ ﺃﻭﺕ ﻟــــﻮﻙ٢٠١٠ ﺍﻹﻧﻧــــﺖ ﻭﺍﻟﻳـــــﺪ ﺍﻹﻟﻜﻭﻧـــــﻲ
ﺃﺩﻭﺑـــــــــﻲ ﻓﻮﺗﻮﺷـــــــــﻮﺏCS5 ﺃﺩﻭﺑـــــــــﻲ ﺇﻟﻴﺴـــــــــﺍﺗﻮﺭCS5 ﺃﺩﻭﺑــــــــــﻲ ﺇﻥ ﺩﻳــــــــــﺰﺍﻳﻦCS5 ﻛﻮﺭﻳــــــــــــــــــــــــــــــﻞ ﺩﺭﻭ X5
ﺃﺩﻭﺑــــــــــــــــــــــــﻲ ﻓــــــــــــــــــــــــﻼﺵCS5 ﺳـــــــــــــــــــــــــﻮﻳﺶ ﻣــــــــــــــــــــــــــﺎﻛﺲ٤
ﺍﻟﺸــــــــــــــــــﺒﻜﺎﺕ
ﺻـــــــــــــــــــﻴﺎﻧﺔ
ﻗﻮﺍﻋـــــــــــﺪ ﺍﻟﺒﻴﺎﻧـــــــــــﺎﺕ
ﻓﻨــــــــــﻲ ﺩﻋــــــــــﻢ ﺍﻟﺸــــــــــﺒﻜﺎﺕ ﺗﺮﻛﻴــﺐ ﺍﻟﺸــﺒﻜﺎﺕ ﺳــﻠﻜﻲ ﻻﺳــﻠﻜﻲ ﺗﺮﻛﻴﺐ ﻭﻣﺪ ﺷﺒﻜﺎﺕ ﺳﻓﺮ ٢٠٠٨
ﻓﻨــــــــﻲ ﺩﻋــــــــﻢ ﺍﻟﺤﺎﺳــــــــﻮﺏ ﺻـــﻴﺎﻧﺔ ﺍﻟﺤﺎﺳـــﺐ ﺍﻵﻟـــﻲ ﻣﺒﺘـ ـﺪﺉ ﺻــﻴﺎﻧﺔ ﺍﻟﺤﺎﺳــﺐ ﺍﻵﻟــﻲ ﻣﺤــﻑ
ﻣﺎﻳﻜﺮﻭﺳــــــــــــــﻮﻓﺖ ﺃﻛﺴــــــــــــــﺲ ٢٠١٠
ﺗﺼـــــــﻤﻴﻢ ﺍﻹﻧﺘﺮﻧـــــــﺖ
ﺍﻟﺒﺮﻣﺠــــــــــــــــــﺔ
ﻓﺮﻭﻧــــــــــــــــــــﺖ ﺑــــــــــــــــــــﻴﺞ ﺃﺩﻭﺑـــــــﻲ ﺩﺭﻳـــــــﻢ ﻭﻳﻔـــــــﺮ CS5 ﺃﺩﻭﺑـــــــــــﻲ ﻓﻮﺗﻮﺷـــــــــــﻮﺏCS5 CSS - HTML
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ ﻣـــــــــﻊ ﻗﻮﺍﻋـــــــــﺪ ﺍﻟﺒﻴﺎﻧـــــــــﺎﺕ ﻛﺮﻳﺴـــــــــــــﺘﺎﻝ ﺭﻳﺒـــــــــــــﻮﺭﺕ
ﺟﻤﻴﻊ ﺍﳴﻮﺍﺩ ﻟﻬﺎ ﻣﻨﺎﻫﺞ ﻣﻌﺪﺓ ﻣﻦ ﻃﺮﳲ
ﻣﻄــــــــﻮﺭ ﻣﻮﺍﻗــــــــﻊ
ﺍﻷﺳﻠﻮﺏ ﺍﻟﺴﻬﻞ ﻭﺍﳴﻨﻈﻢ ﻣﻦ ﺍﻟﺒﺪﺍﻳﺔ ﻟﻺﺣﺍﻑ ﻷﻱ ﻣﺎﺩﺓ
ﻭﺿﻊ ﺍﳴﻨﺎﻫﺞ
ﻭﺍﻟﺨﻄﻂ ﺍﻟﺪﺭﺍﺳﻴﺔ ﺑﺄﺳﻠﻮﺏ ﻣﻴﺴﺮ
MMBADWEYM@YAHOO.COM TEL: 0111 737 76 76
PHP ASP.NET
002 0111 737 7676
ﺍﻟﻠﻬﻢ ﻭﻓﻘﻨﻲ ﳴﺎ ﻓﻴﻪ ﺍﻟﺨ
(
(
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﺍﳴــﻮﺿـــــــــﻮﻉ
ﺭﻗﻢ ﺍﻟﺼﻔﺤﺔ
Variablesﺍﻟﻤﺘﻐﻴﺮﺍﺕ
ﻡ
Variables
Declarations
arrays ﺍﻟﻤﺼﻔﻮﻓﺎﺕ
arrays
Declarations
Constantsﺍﻟﺜﻮﺍﺑﺖ ﺗﺴﻤﻴﺔ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﻭ ﺍﻟﺜﻮﺍﺑﺖ
Operatorsﺍﻟﻤﻌﺎﻣﻼﺕ
MATH
Logical
COMPARE
Function ﺍﻟﺪﻭﺍﻝ Sub ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ Condition ﺍﻟﻌﺒﺎﺭﺍﺕ ﺍﻟﺸﺮﻃﻴﺔ Loopsﺍﻟﺤﻠﻘﺎﺕ ﺃﻏﻠﺐ ﺍﻷﺩﻭﺍﺕ ﺍﻟﻤﺴﺘﺨﺪﻣﺔ ﻓﻲ ﺍﻟﺒﻴﺌﺔ ﺍﻟﺮﺳﻮﻣﻴﺔ ﺃﻣﺜﻠﺔ ﺗﻄﺒﻴﻘﻴﺔ
ﻣﺴﻤﻮح ﺑﺎﻟﺘﺪرﻳﺲ ﻣﻦ اﻟﻜﺘﺎب ﺣﺘﻰ ﺗﻌﻢ اﻟﻔﺎﺋﺪة ﻟﻠﺠﺎﻣﻌﺎت واﻟﻤﺪارس أو أي ﺟﻬﺔ: ﻣﻼﺣﻈﺔ
وﻣــﻦ دواﻋــﻲ ﺳــﺮوري اﻟﺘﻌــﺎون ﻟﻌﻤــﻞ ﻛﺘــﺎب ﻷي ﻣﺆﺳﺴــﺔ ﺗﻌﻠﻴﻤﻴــﺔ ﺑﺄﺳﻠﻮب ﻋﻠﻤﻲ ﺑﺴﻴﻂ ﻣﻴﺴﺮ ﻟﻠﻤﺎدة ﻣﻦ اﻟﺒﺪاﻳﺔ ﻟﻺﺣﺘﺮاف ﻟﺘﻨﺎﺳﺐ ﺳﻮق اﻟﻌﻤﻞ email
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
؟؟Variables ﻣﺎﻫﻲ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ
· · · ·
ﻋﻦ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺍﻟﺒﺴﻴﻄﺔDeclarations ﺍﻹﻋﻼﻥ Dim a As Integer Dim
a
As
Integer variable type ﻧﻮﻉ ﺍﻟﻤﺘﻐﻴﺮ
Variable name ﺇﺳﻢ ﺍﻟﻤﺘﻐﻴﺮ
ﺃﻭﻻﹰ ( ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺍﻟﺒﺴﻴﻄﺔ ﻣﺘﻐﲑات ﳐﺘﺼﺔ ﺑﺎﻷرﻗﺎم Integer Long 1 Dim a As Integer ﻋﺪد ﺻﺤﯿﺢ ﺑﺪون ﻓﺎﺻﻠﺔ ﻋﺸﺮﯾﺔByte Short ﻣﺘﻐﲑ ﺑﻔﺎﺻﻠﺔ ﻋﺸﺮﯾﺔSingle Double 2 Dim b As Single
ﻣﺘﻐﲑات ﳐﺘﺼﺔ ﺑﺎﳊﺮوف 3 Dim c As Char 4 Dim d As String
ﺣﺮف واﺣﺪ ﲨﻠﺔاﳊﺮوف واﻷرﻗﺎم ﺧﻠﯿﻂ
ﻣﺘﻐﲑات أﺧﺮى 5 6
Dim e As Date Dim f As Boolean
ﺗﺎرﯾﺦ True or Falseﺻﺢ أم ﺧﻄﺄ
mmbadweym@yahoo.com
(
(
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﺷﺮﺡ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺍﻟﺒﺴﻴﻄﺔ ﺗﻔﺼﻴﻠﻴﺎ ﺃﻭﻻﹰ( ﻣﺘﻐﻴﺮﺍﺕ ﻣﺨﺘﺼﺔ ﺑﺎﻷﺭﻗﺎﻡ ﻣﺘﻐﻴﺮﺍﺕ ﺍﻷﻋﺪﺍﺩ ﺍﻟﺼﺤﻴﺤﺔ size 1 Byte
save number between 0 to 255
1 Dim a As Byte
size 2 Bytes
save number between -32768 to 32767
2 Dim b As Short
size 4 Bytes
save number between -2147483648 to 2147483647
3 Dim c As Integer
size 8 Bytes ﺃﻛﺒﺮ ﻣﺴﺎﺣﺔ ﻓﻲ ﺍﻟﺬﺍﻛﺮﺓ
save number between -922337203854775808 to 9223372036854775807
4 Dim d As Long
ﻣﺘﻐﻴﺮﺍﺕ ﺫﺍﺕ ﺍﻟﻔﺎﺻﻠﺔ ﺍﻟﻌﺸﺮﻳﺔ اﻹﺛﻨﲔ ﯾﻘﻮﻣﺎن ﺑﺘﺨﺰﯾﻦ اﻷرﻗﺎم اﳌﻮﺟﺒﺔ أو اﻟﺴﺎﻟﺒﺔ ﺑﻔﺎﺻﻠﺔ ﻋﺸﺮﯾﺔ size 4 Bytes
save numbers
Dim a As Single
save numbers
2 Dim b As Double
ﯾﻘﻮم ﺑﺘﺨﺰﯾﻦ ﺭﻗﻢ ﻭﺑﻌﺪ ﺍﻟﻔﺎﺻﻠﺔ ﺍﻟﻌﺸﺮﻳﺔ 7ﺧﺎﻧﺎﺕ ﻟﻸرﻗﺎم اﳌﻮﺟﺒﺔ أو اﻟﺴﺎﻟﺒﺔ ﺍﻷﺭﻗﺎﻡ ﺍﻟﻌﺸﺮﻳﺔ ﺍﻟﺼﻐﻴﺮﺓ size 8 Bytes
ﯾﻘﻮم ﺑﺘﺨﺰﯾﻦ ﺭﻗﻢ ﻭﺑﻌﺪ ﺍﻟﻔﺎﺻﻠﺔ ﺍﻟﻌﺸﺮﻳﺔ 15ﺧﺎﻧﺎﺕ ﻟﻸرﻗﺎم اﳌﻮﺟﺒﺔ أو اﻟﺴﺎﻟﺒﺔ ﺍﻷﺭﻗﺎﻡ ﺍﻟﻌﺸﺮﻳﺔ ﺍﻟﻜﺒﻴﺮﺓ
1
ﺛﺎﻧﻴﺎﹰ( ﻣﺘﻐﻴﺮﺍﺕ ﻣﺨﺘﺼﺔ ﺑﺎﻟﺤﺮﻭﻑ ﻭﺍﻟﺠﻤﻞ ﻣﺘﻐﻴﺮﺍﺕ ﺍﻟﺤﺮﻭﻑ ﻭ ﺍﻟﺠﻤﻞ ü
ﺗﻘﻮم ﲝﻔﻆ اﳌﺘﻐﲑات اﻟﺮﻗﻤﯿﺔ واﻟﻨﺼﯿﺔ ﻋﻠﻰ أﺎ ﻧﺺ size 2 Bytes
save one character ﺗﻘﻮم ﲝﻔﻆ ﺣﺮف واﺣﺪ ﻓﻘﻂ
Dim a As Char
1
size 10 Bytes + 2 Bytes for every char
save string ﺗﻘﻮم ﲝﻔﻆ ﻋﺪة ﺣﺮوف أوأرﻗﺎم أواﻹﺛﻨﲔ وﺗﻌﺘﱪ اﻷرﻗﺎم ﻧﺺ وﻟﯿﺴﺖ رﻗﻢ وﳝﻜﻨﻪ ﺣﻔﻆ ﺣﱴ 2ﺑﻠﯿﻮن ﺑﺪاﺧﻠﻪ
Dim b As String
2
ü
string
ﺛﺎﻟﺜﺎﹰ( ﺃﻧﻮﺍﻉ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺍﻷﺧﺮﻯ ﺃﻧﻮﺍﻉ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺍﻷﺧﺮﻯ size 2 Bytes
save dates اﻟﺘﻮارﯾﺦ ﳛﻔﻆ ﻣﻦ١٠٠/١/١م إﱃ٩٩٩٩/١٢/٣١م
Dim b As Date
2
ﳛﻔﻆ ﻗﯿﻢ إﻣﺎ ﺻﺢ أو ﺧﻄﺄ
size 8 Bytes
save true or false
Dim a As Boolean
1
(
(
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﺗﺤﺪﻳﺪ ﻗﻴﻤﺔ ﺑﺪﺍﺋﻴﺔ ﻟﻠﻤﺘﻐﻴﺮ Dim value As Integer = 10 Dim studentname As String = "ahmed "
ﺗﻌﻴﻴﻦ ﺍﻟﻘﻴﻢ ﻟﻠﻤﺘﻐﻴﺮﺍﺕ ﺍﻟﺨﻄﻮﺍﺕ : أوﻻ ﻗﻤﻨﺎ ﺑﺎﻹﻋﻼن ﻋﻦ اﳌﺘﻐﲑات Dim salary As Single Dim emp_num As Integer :ً ﺛﺎﻧﯿﺎ salary = 2500.5 emp_num = 20
set ü
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
؟؟arraysﻣﺎﻫﻲ ﺍﻟﻤﺼﻔﻮﻓﺎﺕ ü
ﻋﻦ ﺍﻟﻤﺼﻔﻮﻓﺔDeclarations ﺍﻹﻋﻼﻥ Dim names(10) As String names(10)
Dim
As
array name ( )ﻋﺪﺩ ﻋﻨﺎﺻﺮ ﺍﻟﻤﺼﻔﻮﻓﺔ
Integer Array type ﻧﻮﻉ ﺍﻟﻤﺼﻔﻮﻓﺔ
ﻫﻲ ﻧﻔﺲ أﻧﻮاع اﳌﺘﻐﲑات
ﺇﺳﻢ ﺍﻟﻤﺼﻔﻮﻓﺔ
( )ﻋﺪﺩ ﻋﻨﺎﺻﺮ ﺍﻟﻤﺼﻔﻮﻓﺔ
ﺍﻟﺤﺎﻟﺔ ﺍﻷﻭﻟﻰ ﻣﺼﻔﻮﻓﺔ ﺑﻌﺪﺩ ﻋﻨﺎﺻﺮ Dim names(10) As String Dim grades(10) As Integer ü
( Shift+9 ) Shift+0 ﺍﻟﺤﺎﻟﺔ ﺍﻟﺜﺎﻧﻴﺔ ﺍﻟﻤﺼﻔﻮﻓﺔ ﻟﻢ ﺗﺤﺪﺩ ﺑﻌﺪﺩ ﻋﻨﺎﺻﺮ
ﻻﺣﻆ ﺍﻷﻗﻮﺍﺱ ﺍﻟﺘﻲ ﻳﻮﺿﻊ ﺑﻴﻨﻬﺎ ﺍﻷﺳﻤﺎﺀ
Dim emp_names() As String = {"ahmed", "ali", "khalid", "hassan"} Dim salary() As Integer = {1000, 2000, 3000}
EN AR { Shift+[ Shift+{ ؤ } SHIFT+] SHIFT+} ر
EN AR Shift+' Shift+ﺍﻟﻨﺼﻮﺹ ﺗﻜﺘﺐ ﺑﻴﻦ ﻋﻼﻣﺎﺕ ﺗﻨﺼﻴﺺ " " ط ﺍﻷﺭﻗﺎﻡ ﺗﻜﺘﺐ ﺑﺪﻭ ﻋﻼﻣﺎﺕ ﺗﻨﺼﻴﺺ
ﺗﻌﻴﻴﻦ ﺍﻟﻘﻴﻢ ﺍﻟﻤﺼﻔﻮﻓﺔ ﺍﻟﺤﺎﻟﺔ ﺍﻟﺜﺎﻟﺜﺔ ﻻﺣﻆ ﺣﺪﺩ ﻋﺪﺩ ﻋﻨﺎﺻﺮﻫﺎ ﻭﻻﺣﻆ ﺧﺼﺼﻨﺎ ﻟﻜﻞ ﻋﻨﺼﺮ ﻗﻴﻤﺔ ﻭﺑﺪﺃﻧﺎ ﻣﻦ ﺍﻟﺼﻔﺮ Dim stuages(3) As Integer stuages(0) = 30 stuages(1) = 20 stuages(2) = 30
mmbadweym@yahoo.com
(
(
· ·
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
؟؟Constantsﻣﺎﻫﻲ ﺍﻟﺜﻮﺍﺑﺖ
Const PI = 3.14 Const COMP_NAME = "MBM"
Constantsﺍﻹﻋﻼﻥ ﻋﻦ ﺍﻟﺜﻮﺍﺑﺖ const
PI
=
Constant name ﺇﺳﻢ ﺍﻟﺜﺎﺑﺖ
3.14 Constant value ﻗﻴﻤﺔ ﺍﻟﺜﺎﺑﺖ ﻣﺜﺎﻝ
Form1 Bu on1 TextBox1 TextBox2 Button1 click أﻛﺘﺐ اﻟﻜﻮد اﻟﺘﺎﱄ ﰲ ﺣﺪث Const PI = 3.14 Const COMP_NAME = "MBM" Dim CIR As Double CIR = 2 * PI * 5 TextBox1.Text = CIR TextBox2. Text = COMP_NAME F5 ﺍﻟﻤﻼﺣﻆ ﻋﻨﺪ ﺗﺸﻐﯿﻞ اﻟﱪﻧﺎﻣﺞ TextBox2. Text = COMP_NAME TextBox1.Text = CIR
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﺗﺴﻤﻴﺔ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﻭ ﺍﻟﺜﻮﺍﺑﺖ Name Variables & Constants ﻫﻨﺎﻙ ﺃﺻﻮﻝ ﻋﺎﻣﺔ ﻟﺘﺴﻤﻴﺔ Variables ﺍﻟﻤﺘﻐﻴﺮﺍﺕ : ﻳﺴﺘﺨﺪﻣﻬﺎ ﺍﻟﻤﺒﺮﻣﺠﻮﻥ ﺃﺛﻨﺎﺀ ﺗﺴﻤﻴﺔ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺑﺎﻟﺒﺮﻧﺎﻣﺞ ﻭ ﻣﻨﻬﺎ ﻣﺎﻳﻠﻲ : أوﻻ
ﯾﺘﻢ ﺗﻌﯿﲔ ﺑﺪاﯾﺔ ﺣﺮوف اﳌﺘﻐﲑ ﰒ ﯾﺒﺪأ اﳌﺘﻐﲑ ﲝﺮف ﻛﺒﲑ
1 2 3 4 5
Dim Dim Dim Dim Dim
intAge As Integer byNumber As Byte strName As String bStatus As Boolean dtBirthdate As Date
إﺳﻢ اﳌﺘﻐﲑ Variable Name intAge byNumber strName bStatus dtBirthdate
ﺑﺪاﯾﺔ ﺣﺮوف اﳌﺘﻐﲑ
ﰒ ﯾﺒﺪأ اﳌﺘﻐﲑ ﲝﺮف ﻛﺒﲑ
int by str b dt
Age Number Name Status Birthdate
ﻧﻮع اﳌﺘﻐﲑ Variable Type Integer Byte String Boolean Date
ﻫﻨﺎﻙ ﺃﺻﻮﻝ ﻋﺎﻣﺔ ﻟﺘﺴﻤﻴﺔ Constantsﺍﻟﺜﻮﺍﺑﺖ
: ﻳﺴﺘﺨﺪﻣﻬﺎ ﺍﻟﻤﺒﺮﻣﺠﻮﻥ ﺃﺛﻨﺎﺀ ﺗﺴﻤﻴﺔ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺑﺎﻟﺒﺮﻧﺎﻣﺞ ﻭ ﻣﻨﻬﺎ ﻣﺎﻳﻠﻲ : أوﻻ ﯾﺘﻢ ﺗﻌﯿﯿﻨﻪ ﲝﺮوف ﻛﺒﲑة إﺳﻢ اﻟﺜﺎﺑﺖ ﻗﯿﻤﺔ اﻟﺜﺎﺑﺖ Constante Name Constante Vaalue Const PI = 3.14 PI 3.14 Const COMP_NAME = "MBM" COMP_NAME "MBM"
: ﻣﻼﺣﻈﺔ *ﺃﻧﺖ ﺣﺮ ﻓﻲ ﺗﺴﻤﻴﺔ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﻭﺍﻟﺜﻮﺍﺑﺖ ﻫﺬﺍ ﻳﺮﺟﻊ ﻟﻚ ﺇﺫﺍ ﺃﺭﺩﺕ ﺍﻟﺴﻴﺮ ﻋﻠﻰ ﺗﻠﻚ ﺍﻟﻘﺎﻋﺪﺓ ﺃﻡ ﻻ ﻫﺬﺍ ﻳﺮﺟﻊ ﻟﻚ ﻭﻟﺘﻨﻈﻴﻤﻚ *ﻭﻫﺬﺍ ﺗﻮﺿﻴﺢ ﻟﻔﻜﺮﺓ ﺗﻨﻈﻴﻢ ﺃﻓﻜﺎﺭﻙ ﻓﻘﻂ ﻧﺴﺎﻋﺪﻙ ﻋﻠﻰ ﺍﻟﺘﻔﻜﻴﺮ
ü
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Operatorsﺍﻟﻤﻌﺎﻣﻼﺕ اﻟﺘﻌﺮف ﻋﻠﻰ اﳌﻌﺎﻣﻼت اﻟﺮﯾﺎﺿﯿﺔ اﻟﱵ ﻻﳝﻜﻦ أن ﳜﻠﻮ ﻣﻨﻬﺎ ﺑﺮﻧﺎﻣﺞ : وﺳﻮف ﻧﻮﺿﺤﻬﺎ وذﻟﻚ ﻋﻦ ﻃﺮﯾﻖ اﳌﺜﺎل اﻟﺘﺎﱄ ﻻﺣﻆ ﻣﻌﻲ ﻻﺣﻆ ﯾﺘﻢ ﺗﻌﺮﯾﻒ اﳌﺘﻐﲑات ﺎ ﻣﺘﻐﲑ أﯾﻀﺎ ﺣﱵ ﳛﺠﺰ ﳍﺎ ﻟﯿﺘﻢ وﺿﻊ ﻗﯿﻤﺔ ﻟﻠﻌﻤﻠﯿﺔاﻟﱵ ﺗﺘﻢوﻛﺬك اﻟﻌﻤﻠﯿﺔ اﻟﱵ ﺗﺘﻢ ﻋﻠﻰ أ : ﺃﻭﻻﹰ ﺗﻌﺮﻳﻒ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﺍﻟﻤﺴﺘﺨﺪﻣﺔ ﻓﻲ ﺍﻟﻤﻌﺎﻣﻼﺕ Dim A As Integer Dim B As Integer : ﺛﺎﻧﻴﺎﹰ
: ﺛﺎﻟﺜﺎﹰ
ﺗﻌﺮﻳﻒ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﻧﺎﺗﺞ ﺍﻟﻤﻌﺎﻣﻼﺕ
Operators ﺍﻟﻤﻌﺎﻣﻼﺕ
1
Dim SUM As Integer
SUM = A + B
2
Dim SUBSTRACT As Integer
SUBSTRACT = A - B
3
Dim MUL As Long
MUL = A * B
VB
Math
ﻣﻌﺎﻣﻞ ﺍﻟﺠﻤﻊ
+
+
ﻣﻌﺎﻣﻞ ﺍﻟﻄﺮﺡ
-
-
ﻣﻌﺎﻣﻞ ﺍﻟﻀﺮﺏ
*
×
/
÷
ﻣﻌﺎﻣﻼﺕ ﺍﻟﻘﺴﻤﺔ 4
Dim DIVISION As Double
DIVISION = A / B
5
Dim VALUE1 As Double
VALUE1 = A \ B
6
Dim VALUE2 As Double
VALUE2 = A Mod B
7
Dim VALUE3 As Double
VALUE3 = B ^ 2
Dim NAME As String
NAME = "
ﺍﻟﻘﺴﻤﺔ ﻣﻊ ﻓﻮاﺻﻞ ﺍﻟﻘﺴﻤﺔ ﺑﺪون ﻓﻮاﺻﻞ
ﻣﻌﺎﻣﻞ ﻗﯿﻤﺔ ﻣﻌﺎﻣﻞ ﻗﯿﻤﺔ
ﺑﺎﻗﻲ ﺍﻟﻘﺴﻤﺔ ﻗﯿﻤﺔ ﺑﺪون ﻓﻮاﺻﻞ
\
Mod
ﺍﻷﺱ
^
ﻣﻌﺎﻣﻞ ﺍﻟﺪﻣﺞ ﺑﻴﻦ ﺍﻟﻘﻴﻢ ﺍﻟﻨﺼﻴﺔ
&
B2
AHMED " & "ALHASSAN" إﺳﻨﺎد ﻗﯿﻤﺔ ﳌﺘﻐﲑ
A = 10 B = 20 ﻣﺎﺫﺍ ﺗﻌﻨﻲ A += 2
A = A + 2
A -= 2
A = A - 2
A -= 3
A = A - 3
A ^= 5
A = A ^ 5
A /= 3
A = A / 2
A*=3
A = A * 3
mmbadweym@yahoo.com
(
(
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
email
mmbadweym@yahoo.com
ﺍﻟﺪﻭﺍﻝ Function ﺃﻭﻻﹰ :ﺍﻟﺪﻭﺍﻝ ﺍﻟﺠﺎﻫﺰﺓ ﺩﻭﺍﻝ ﺍﻟﺘﺤﻮﻳﻞ Convert Function
(١
ﻣﺜﻼ ﻟﺪﯾﻨﺎ ﻣﺘﺘﻐﲑات وﻧﺮﯾﺪ ﲢﻮﯾﻠﻬﺎ ﻣﻦ ﻧﻮع ﻵﺧﺮ ﺳﻮف ﯾﺘﻢ ذﻟﻚ ﺑﺪوال اﻟﺘﺤﻮﯾﻞ ﻣﺜﺎل ﻣﻦ ﻋﺪد ﺻﺤﯿﺢ إﱃ ﻋﺪد ﻋﺸﺮي أوﻻ ﺳﻨﻘﻮم ﺑﺘﻌﺮﯾﻒ ﻣﺘﻐﲑات ﰲ ﺑﺪاﯾﺔ اﻟﱪﻧﺎﻣﺞ ﻣﻼﺣﻈﺎﺕ ﻟﻠﺘﻨﺒﻴﻪ ﻟﻴﺘﺴﻊ ﻓﻜﺮﻙ :ﺩﻭﺍﻝ ﺍﻟﺘﺤﻮﻳﻞ ﻣﻦ ﺍﻟﺪﻭﺍﻝ ﺍﻟﻬﺎﻣﺔ ﺟﺪﺍً ﳲ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ﺣﻴﺚ ﺗﻘﻮﻡ ﺑﺘﺤﻮﻳﻞ ﻣﻦ ﻣﺘﻐ ﳴﺘﻐ ﺁﺧﺮ ﺩﻭﺍﻝ ﻣﺒﻨﻴﺔ ﺩﺍﺧﻞ ﺑﻴﺌﺔ ﺍﻟﻧﺎﻣﺞ
ﺣﻴﺚ ﺃﻧﻬﺎ ﺇﺳﻤﻬﺎ ﺩﻭﺍﻝ ﺗﺤﻮﻳﻞ ﺃﻱ ﻣﻦ ﻛﻠﻤﺔ convertﺑﺎﻹﻧﺠﻠﻴﺰﻳﺔ
ﺳﻬﻮﻟﺔ ﻟﻠﺤﻔﻆ
ﺗﺤﻮﻳﻞ ﺇﻟﻰ convert === c ﺛﺎﻧﻴﺎﹰ
ﺃﻭﻻﹰ
ﺩﻭﺍﻝ ﺍﻟﺘﺤﻮﻳﻞ ﻧﻜﺘﺒﻬﺎ ﻷﻧﻬﺎ ﺗﺤﻮﻝ ﺍﳴﺘﻐﺍﺕ
ﻧﻌﺮﻑ ﻧﻮﻉ ﺍﳴﺘﻐﺍﺕ
)CByte(a )CDbl(a )CInt(a )CLng(a )CBool(a )CDate(b
Byte Double Integer Long Boolean Date Character String ﻭﺃﺧﻴﺮﺍﹰ ﻣﻼﺣﻈﺔ ﻫﺎﻣﺔ ﺟﺪﺍﹰ ﻟﻺﺳﺘﺬﻛﺎﺭ ﺃﻛﺘﺐ ﺣﺮﻑ c
a a a a a b
1 2 3 4 5 6
= = = = = =
)c = CChar(c )c = CStr(c
7 8
Dim a As Integer
Dim b As String Dim c As Char
ًC=C ﻫﻨﺎ ﯾﻌﺮض ﻋﻠﯿﻚ ﻓﯿﺠﻮال ﺑﯿﺴﯿﻚ إﻛﻤﺎل إﺳﻢ اﻟﺪاﻟﺔ ﺗﻠﻘﺎﺋﯿﺎ
ﺗــــــﺄﺗﻲ ﻟــــــﻚ ﺇﺳــــــﻢ ﺍﻟﺪﺍﻟــــــﺔ ﻣﻠﺤﻮﻇﺔ ﻫﺎﻣﺔ ﺟﺪﺍﹰ ﻟﺪﻭﺍﻝ ﺍﻟﺘﺤﻮﻳﻞ
ﻭﻳﻤﻜﻦ ﻛﺘﺎﺑﺘﻬﺎ ﻛﻤﺎ ﻳﻠﻲ ﺣﺘﻰ ﻳﺴﻬﻞ ﻋﻠﻴﻚ ﺣﻔﻈﻬﺎ ﻭﺇﺳﺘﺬﻛﺎﺭﻫﺎ ﺩﺍﺋﻤﺎﹰ ﺑﺼﻴﺎﻏﺔ ﻋﺎﻣﺔ ﻓﻲ ﺑﺮﻧﺎﻣﺞ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ )Newv = CType(oldv.newtype )a = CType(a, String newtype String
) )
oldv a
. ,
ctype CType
( (
= =
newv a
ﻣﺜﺎﻝ ﻟﺪﺍﻟﺔ ﺍﻟﺘﺤﻮﻳﻞ ﺳﻨﻘﻮم ﺑﻌﻤﻞ ﺑﺮﻧﺎﻣﺞ ﺑﺴﯿﻂ ﻟﺘﺤﻮﯾﻞ ﻣﻦ ﻗﯿﻤﺔ ﺑﻔﻮاﺻﻞ ﻟﻌﺪد ﺻﺤﯿﺢ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 TextBox1 TextBox1 ﰲ ﺣﺪث اﻟﻨﻘﺮ Button1
اﻟﻜﻮد إﻋﻼن اﳌﺘﻐﲑ ذو ﻓﺎﺻﻠﺔ ﻋﺸﺮﯾﺔ إﺳﻨﺎد ﻗﯿﻤﺔ اﳌﺘﻐﲑ داﻟﺔ ﲢﻮﯾﻞ ﻗﯿﻤﺔ ﺻﺤﯿﺤﺔ ﺳﻮف ﺗﻈﻬﺮ اﻟﻘﯿﻤﺔ اﶈﻮﻟﺔﺻﺤﯿﺤﺔ
(
Button1_Click
Dim A As Single )A = Val(TextBox1.Text )A = CInt(A TextBox2.Text = A
(
mmbadweym@yahoo.com
email
Visual Basic 2010 , ADO.NET, Crystal Report
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
(
mmbadweym@yahoo.com
email
ﺃﻭﻻﹰ :ﺍﻟﺪﻭﺍﻝ ﺍﻟﺠﺎﻫﺰﺓ (٢ﺩﻭﺍﻝ ﺍﻟﺠﻤﻞStrings function أوﻻ ﺳﻨﻘﻮم ﺑﺘﻌﺮﯾﻒ ﻣﺘﻐﲑات ﰲ ﺑﺪاﯾﺔ اﻟﱪﻧﺎﻣﺞ ﻣﺨﺘﺼﺔ ﺑﺎﻟﻨﺼﻮﺹ
ﻣﻦ ﺣﻴﺚ ﻣﺎﻳﻠﻲ
ﺃﻭﻻﹰ
ﺛﺎﻧﻴﺎﹰ
ﻧﻌﺮﻑ ﻧﻮﻉ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ
ﺩﻭﺍﻝ ﺍﻟﺠﻤﻞ ﻣﺨﺘﺼﺔ ﺑﺎﻟﻨﺼﻮﺹ
ﺩﻭﺍﻝ ﺗﻘﻮﻡ ﺑﺈﺭﺟﺎﻉ ﻗﻴﻤﺔ ﻓﻲ ﻣﺘﻐﻴﺮ ﺍﻟﺘﻔﺴﻴﺮ ﺳﯿﻌﻮد ﺑﻌﺪد أﺣﺮف اﻟﻜﻠﻤﺔ ﻗﯿﻤﺔ اﳊﺮف ﰲ ﺟﺪولasci ﻣﻌﺮﻓﺔ اﳊﺮف اﻟﺬي رﻗﻤﻪ 80ﰲ ﺟﺪولasci ﲢﻮﯾﻞ ﺳﻠﺴﻠﺔ ﻧﺼﯿﺔ إﱃ ﺣﺮوف ﻛﺒﲑةuppercase ﲢﻮﯾﻞ ﺳﻠﺴﻠﺔ ﻧﺼﯿﺔ إﱃ ﺣﺮوف ﻛﺒﲑةlowcase ﳊﺬف ﲨﯿﻊ اﳌﺴﺎﻓﺎت اﻟﻔﺎرﻏﺔ ﻗﺒﻞ اﻟﻨﺺ ﳊﺬف ﲨﯿﻊ اﳌﺴﺎﻓﺎت اﻟﻔﺎرﻏﺔ اﻟﱵ ﺗﺄﺗﻲ ﻋﻠﻰ اﻟﯿﻤﲔ ﺗﻘﻮم ﲝﺬف اﳌﺴﺎﻓﺎت ﻋﻠﻰ اﻟﯿﻤﲔ أو اﻟﯿﺴﺎر
)"value = Len("mbm )"value = Asc("g
1 2
Dim value As Integer
)cname = Chr(80
3
Dim cname As Char
name name name name name
4 5 6 7 8
Dim name As String
)UCase(name )LCase(name )"LTrim(" MBM RTrim("MBM )" Trim(" MBM )"
= = = = =
ﻣﺜﺎﻝ ﻟﺪﻭﺍﻝ ﺍﻟﺠﻤﻞ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 اﻟﻜﻮد
ﰲ ﺣﺪث اﻟﻨﻘﺮ Button1
إﻋﻼن اﳌﺘﻐﲑ إﺳﻨﺎد ﻗﯿﻤﺔ اﳌﺘﻐﲑ داﻟﺔ ﲢﻮﯾﻞ ﺣﺮوف ﻛﺒﲑة ﺳﻮف ﺗﻈﻬﺮ اﻟﻘﯿﻤﺔ اﶈﻮﻟﺔ
Button1_Click
Dim A As String "A = "mbm )A = UCase(A TextBox2.Text = A )Console.WriteLine(A
)View – Other Windows – Output(Ctrl+Alt+O
(
(
mmbadweym@yahoo.com
email
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﺃﻭﻻﹰ :ﺍﻟﺪﻭﺍﻝ ﺍﻟﺠﺎﻫﺰﺓ ﺩﻭﺍﻝ ﺃﺧﺮﻯOther Functions ﻫﻨﺎك اﻟﻌﺪﯾﺪ ﻣﻦ اﻟﺪوال ًوﻣﻨﻬﺎ اﻟﱵ ﳝﻜﻨﻚ إﺳﺘﺨﺪاﻣﻬﺎ ﰲ ﻓﯿﺠﻮال ﺑﯿﺴﯿﻚ وﻫﻲ ﻣﺒﻨﯿﺔ داﺧﻠﯿﺎ (١دوال ﻣﻌﺮﻓﺔ اﻟﻨﻮع (٢دوال ﻣﻌﺮﻓﺔ اﻟﺘﺎرﯾﺦ واﻟﻮﻗﺖ ﺛﺎﻧﻴﺎﹰ
ﺃﻭﻻﹰ
ﺩﻭﺍﻝ ﺃﺧﺮﻯ
ﻧﻌﺮﻑ ﻧﻮﻉ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ
ﺩﻭﺍﻝ ﻣﻌﺮﻓﺔ ﺍﻟﻨﻮﻉ واﻟﺘﺄﻛﺪ ﻣﻨﻪ ﺍﻟﺘﻔﺴﻴﺮ
Dim b_date As Date Dim d_date As Date Dim dt_date As Date Dim name(10) As String Dim value As Integer ﻧﻘﻮم ﺑﺈﻋﻼن ﻣﺘﻐﲑات اﻟﱵ ﯾﺮﺟﻊ ﲠﺎ اﻟﻘﯿﻢ ﺣﯿﺚ أﺎ دوال إﺧﺘﺒﺎر ﻛﻠﻬﺎ ﻟﻠﺘﺄﻛﺪ ﻣﻦ ﻧﻮع ﻣﺘﻐﲑ ﻟﺬﻟﻚ ﺳﻮف ﺗﻜﻮنBoolean ﻷﺎ ﺳﻮف ﺗﺮﺟﻊtrue or false )Dim a, b, c As Boolean a = IsDate(b_date
إﺧﺘﺒﺎر اﳌﺘﻐﲑ أﻋﻠﻨﺎ ﻋﻦ اﳌﺘﻐﲑ ﺳﺎﺑﻘﺎb_date ﻧﻘﻮم ﺑﺎﻹﺧﺘﺒﺎر إذا ﻛﺎن ﺗﺎرﯾﺦ أم ﻻ
)b = IsArray(name
إﺧﺘﺒﺎر اﳌﺘﻐﲑ أﻋﻠﻨﺎ ﻋﻦ اﳌﺘﻐﲑ ﺳﺎﺑﻘﺎ ﻧﻘﻮم ﺑﺎﻹﺧﺘﺒﺎر إذا ﻛﺎن nameﻣﺼﻔﻮﻓﺔ أم ﻻ إﺧﺘﺒﺎر اﳌﺘﻐﲑ أﻋﻠﻨﺎ ﻋﻦ اﳌﺘﻐﲑ ﺳﺎﺑﻘﺎ ﻧﻘﻮم ﺑﺎﻹﺧﺘﺒﺎر إذا ﻛﺎن
)c = IsNumeric(value valueرﻗﻢ أم ﻻ
ﺩﻭﺍﻝ ﺃﺧﺮﻯ دوال ﻣﻌﺮﻓﺔ اﻟﺘﺎرﯾﺦ واﻟﻮﻗﺖ Dim d_date As Date Dim dt_date As Date d_date = Today دوال ﺗﺮﺟﻊ اﻟﺘﺎرﯾﺦ اﳊﺎﱄ اﻟﯿﻮم واﻟﺸﻬﺮ واﻟﺴﻨﺔ dt_date = Now ً اﳌﻮﺟﻮد داﺧﻞ ﻧﻈﺎم اﻟﻜﻤﺒﯿﻮﺗﺮ اﻟﺘﺎرﯾﺦ واﻟﻮﻗﺖ ﻣﻌﺎ
(
(
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﺃﻣﺜﻠﺔ ﻟﺪﻭﺍﻝ ﺃﺧﺮﻯ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ ﺩﻭﺍﻝ ﺃﺧﺮﻯ دوال ﻣﻌﺮﻓﺔ اﻟﺘﺎرﯾﺦ واﻟﻮﻗﺖ
Form1 Label1 Label2 Label3 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Label1.Text = Today Label2.Text = TimeOfDay Label3.Text = Now
Label1 ﻋﺮض اﻟﺘﺎرﯾﺦ Label2 ﻋﺮض اﻟﻮﻗﺖ Label3ً اﻟﺘﺎرﯾﺦ واﻟﻮﻗﺖ ﻣﻌﺎ
ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ ﺩﻭﺍﻝ ﺃﺧﺮﻯ
Form1 TextBox1 TextBox2 Button1
Button1_Click
ﺩﻭﺍﻝ ﻣﻌﺮﻓﺔ ﺍﻟﻨﻮﻉ واﻟﺘﺄﻛﺪ ﻣﻨﻪ داﻟﺔ IsNumeric
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ اﻟﻜﻮد Dim b As Boolean b = IsNumeric(TextBox1.Text) TextBox2.Text = b
ﺎدوال ﺗﺄﻛﺪ ﺻﺢ ﻷBoolean ﺗﻌﺮﯾﻒ اﳌﺘﻐﲑ ﻧﻮﻋﻪ أم ﺧﻄﺄ داﻟﺔ اﻟﺘﺄﻛﺪ ﻫﻞ اﳌﺪﺧﻞ رﻗﻢ إﻇﻬﺎر اﻟﻨﺘﯿﺠﺔ ﺻﺢ أم ﺧﻄﺄ
ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ ﺩﻭﺍﻝ ﺃﺧﺮﻯ
Form1 TextBox1 TextBox2 Button1 Button1_Click
ﺩﻭﺍﻝ ﻣﻌﺮﻓﺔ ﺍﻟﻨﻮﻉ واﻟﺘﺄﻛﺪ ﻣﻨﻪ IsDate
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ اﻟﻜﻮد Dim b As Boolean b = IsDate(TextBox1.Text) TextBox2.Text = b
mmbadweym@yahoo.com
ﺎدوال ﺗﺄﻛﺪ ﺻﺢ أم ﻷBoolean ﺗﻌﺮﯾﻒ اﳌﺘﻐﲑ ﻧﻮﻋﻪ ﺧﻄﺄ داﻟﺔ اﻟﺘﺄﻛﺪ ﻫﻞ اﳌﺪﺧﻞ ﺗﺎرﯾﺦ إﻇﻬﺎر اﻟﻨﺘﯿﺠﺔ ﺻﺢ أم ﺧﻄﺄ
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Sub ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ Sub test(ByVal t As String) Console.WriteLine(t) End Sub Sub
ﻛﻴﻔﻴﺔ ﺇﻧﺸﺎﺀ ﺭﻭﺗﻴﻦ test
ﺑﺪﺍﻳﺔ ﺍﻟﺮﻭﺗ
ﺇﺳﻢ ﺍﻟﺮﻭﺗ
(
ByVal
t
As
ﺇﺳﻢ ﻣﺘﻐ
String
)
ﻧﻮﻉ ﺍﳴﺘﻐ
Console.WriteLine(t) View – Other Windows – Output(Ctrl+Alt+O) ﺟﻤﻠﺔ ﺍﻟﺨﺮﺝ
ﻧﺎﻣﺞ ﺑﻌﻤﻠﻪﻳﻤﻜﻨﻚ ﻛﺘﺎﺑﺔ ﺃﻱ ﺷﻲﺀ ﻳﻘﻮﻡ ﺍﻟ output ﻓﻬﻨﺎ ﻗﻠﻨﺎ ﻟﻪ ﺇﻃﺒﻊ
End Sub ﻧﻬﺎﻳﺔ ﺍﻟﺮﻭﺗ
Sub ﻣﺜﺎﻝ ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ Sub
Form1 Button1 Declarations
ﺧﻠﻲ ﺑﺎﻟﻚ ﯾﺘﻢ ﻛﺘﺎﺑﺘﻬﺎ ﻫﻨﺎ
Form1 ﰲ ﺣﺪث Sub test(ByVal t As String) Console.WriteLine(t) End Sub
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
Sub ﯾﺘﻢ إﻧﺸﺎء روﺗﲔ ﻓﺮﻋﻲ ﻣﺎﯾﻌﻮض ﻋﻨﻬﺎt ﲨﻠﺔ اﳋﺮج ﻃﺒﺎﻋﺔ test("hello")
اﻟﻜﻮد
test("hello")
test إﺳﺘﺪﻋﺎء اﻟﺮوﺗﲔ اﻟﻔﺮﻋﻲ
ﺗﻮﺿﻴﺢ ﻟﻠﻤﺜﺎﻝ ﺍﻟﺴﺎﺑﻖ ﺇﺳﺘﺪﻋﺎﺀ ﺭﻭﺗﻴﻦ test("hello") test
("hello")
ﺇﺳﻢ ﺍﻟﺮﻭﺗ
Console.WriteLine(t)ﻫﺬﺍ ﺍﻟﺴﻄﺮ ﻫﻮ ﻧﺎﺗﺞ ﺍﻟﺮﻭﺗ
ﺛﻢ ﺍﻟﺘﻌﻮﻳﺾ ﻋﻦ ﺍﳴﺘﻐ
View – Other Windows – Output(Ctrl+Alt+O)
hello ﻓﻴﺘﻢ ﻃﺒﺎﻋﺔ
ﻣﺜﺎﻝ ﻋﻠﻰ ﻣﺎﺳﺒﻖ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 Form ﰲ ﺣﺪث
Declarations
Sub s_print(ByVal a As String, ByVal b As Integer) Console.WriteLine(a) aﻃﺒﺎﻋﺔ Console.WriteLine(b) bﻃﺒﺎﻋﺔ Console.WriteLine() ﯾﺘﻢ وﺿﻊ ﺳﻄﺮ ﻓﺎرغ End Sub Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
ﯾﺘﻢ إﻧﺸﺎء روﺗﲔ ﻓﺮﻋﻲ s_print
اﻟﻜﻮد
Dim name() As String = {"khalid", "ali"} Dim grade() As Integer = {50, 90} s_print(name(0), grade(0)) s_print(name(1), grade(1))
mmbadweym@yahoo.com
(
إﺳﺘﺪﻋﺎء اﻟﺮوﺗﲔ s_print a= name(0),b= grade(0) a= name(1),b= grade(1)
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Functionﺍﻟﺪﻭﺍﻝ ﺍﻟﺪﻭﺍﻝ ﺍﻟﻤﻨﺸﺄﺓ ﻣﺸﺎﺑﻬﺔ ﻟﻠﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ ﻭﻟﻜﻨﻬﺎ ﺗﻌﻴﺪ ﻗﻴﻤﺔ ﻟﻠﻤﻜﺎﻥ ﺍﻟﺬﻱ ﺇﺳﺘﺪﻋﺎﺋﻬﺎ Function area(ByVal l As Integer, ByVal w As Integer) As Integer Return l * w End Function
Function ﺑﺪﺍﻳﺔ ﺍﻟﺪﺍﻟﺔ
area ﺇﺳﻢ
ﺍﻟﺪﺍﻟﺔ
(
ByVal
ﺇﻋﻼﻥ
ﺍﳴﺘﻐ
l
ﺇﺳﻢ
As
ﻣﺘﻐ
Integer ﻧﻮﻉ ﺍﳴﺘﻐ
, ,
ByVal
w
ﺇﺳﻢ
As
ﻛﻴﻔﻴﺔ ﺇﻧﺸﺎﺀ ﺩﺍﻟﺔ
Integer ﻧﻮﻉ ﺍﳴﺘﻐ
ﻣﺘﻐ
)
As
Integer ﺍﻟﻘﻴﻤﺔ ﺍﻟﺘﻲ
ﺗﻌﻴﺪﻫﺎ ﻟﻠﻤﻜﺎﻥ ﺍﻟﺬﻱ
ﺇﺳﺘﺪﻋﺎﺋﻬﺎ
ﻋﻠﻰ ﻋﻜﺲ ﺍﻟﺮﻭﺗﻨ
sub ﺍﻟﻔﺮﻋﻲ ﻻﻳﻌﻴﺪ ﻗﻴﻤﺔ
l,w ﺃﻱ ﻳﺮﺟﻊ ﻗﻴﻤﺔ
Return l * w End Function
ﻧﻬﺎﻳﺔ ﺍﻟﺪﺍﻟﺔ
Functionﻣﺜﺎﻝ ﺍﻟﺪﻭﺍﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Function ﺍﻟﺪﺍﻟﺔ
Form1 textbox1.text Button1 Form ﰲ ﺣﺪث
ﺧﻠﻲ ﺑﺎﻟﻚ ﯾﺘﻢ ﻛﺘﺎﺑﺘﻬﺎ ﻫﻨﺎ
Function area(ByVal l As Integer, ByVal w As Integer) As Integer Return l * w End Function
ﯾﺘﻢ إﻧﺸﺎء Function داﻟﺔ area إﲰﻬﺎ
Declarations
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
textbox1.text = area(5, 6)
إﺳﺘﺪﻋﺎء اﻟﺪاﻟﺔ area
area وﻣﻦ ﰒ ﯾﺮﺟﻊ اﻟﻘﯿﻤﺔl,w ﺑﺎﻟﺘﻌﻮﯾﺾ ﻋﻦ
mmbadweym@yahoo.com
(
(
ﯾﻘﻮم اﻟﱪﻧﺎﻣﺞ
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﻣﻘﺎﺭﻧﺔ ﺑﻴﻦ ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ Subﻭ ﺍﻟﺪﺍﻟﺔ Function ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ Sub )
String ﻧﻮﻉ ﺍﳴﺘﻐ
t
As
ByVal
ﺇﺳﻢ ﻣﺘﻐ
(
Sub
test
ﺑﺪﺍﻳﺔ ﺍﻟﺮﻭﺗ
ﺇﺳﻢ ﺍﻟﺮﻭﺗ
)Console.WriteLine(t) View – Other Windows – Output(Ctrl+Alt+O ﺟﻤﻠﺔ ﺍﻟﺨﺮﺝ
ﻳﻤﻜﻨﻚ ﻛﺘﺎﺑﺔ ﺃﻱ ﺷﻲﺀ ﻳﻘﻮﻡ ﺍﻟﻧﺎﻣﺞ ﺑﻌﻤﻠﻪ ﻓﻬﻨﺎ ﻗﻠﻨﺎ ﻟﻪ ﺇﻃﺒﻊ output
End Sub ﻧﻬﺎﻳﺔ ﺍﻟﺮﻭﺗ
ﺍﻟﺪﺍﻟﺔ Function ﻻﺗﻮﺟﺪ ﻓﻲ
ﺍﻟﺮﻭﺗﻴﻦ ﺍﻟﻔﺮﻋﻲ Integer ﺍﻟﻘﻴﻤﺔ ﺍﻟﺘﻲ
As
ﺗﻌﻴﺪﻫﺎ ﻟﻠﻤﻜﺎﻥ
)
Integer ﻧﻮﻉ ﺍﳴﺘﻐ
As
w
ﺇﺳﻢ
ByVal
,
ﻣﺘﻐ
ﺍﻟﺬﻱ
Integer ﻧﻮﻉ ﺍﳴﺘﻐ
,
As
l
ﺇﺳﻢ
ﻣﺘﻐ
ByVal
ﺇﻋﻼﻥ
(
ﺍﳴﺘﻐ
area ﺇﺳﻢ
ﺍﻟﺪﺍﻟﺔ
Function ﺑﺪﺍﻳﺔ ﺍﻟﺪﺍﻟﺔ
ﺇﺳﺘﺪﻋﺎﺋﻬﺎ
ﻋﻠﻰ ﻋﻜﺲ ﺍﻟﺮﻭﺗﻨ
ﺍﻟﻔﺮﻋﻲ sub ﻻﻳﻌﻴﺪ ﻗﻴﻤﺔ
ﺃﻱ ﻳﺮﺟﻊ ﻗﻴﻤﺔ l,w
Return l * w ﻧﻬﺎﻳﺔ ﺍﻟﺪﺍﻟﺔ
End Function
ﻣﺪﻯ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ ﻭﻛﺬﻟﻚ ﺍﻟﺤﺎﻝ ﺑﺎﻟﻨﺴﺒﺔ ﻟﻺﺟﺮﺍﺀﺍﺕ ü
ﳛﺪ ﻣﺪى رؤﯾﺔ ﻫﺬا اﳌﺘﻐﲑ ﺿﻤﻦ إﺟﺮاءات اﻟﱪﻧﺎﻣﺞ إﻋﻼن ﻣﺘﻐﲑ
أي أن اﳌﺘﻐﲑ ﻋﺎم ﯾﺘﻢ رؤﯾﺘﻪ ﻣﻦ ﻛﺎﻓﺔ أﺟﺰاء اﻟﱪﻧﺎﻣﺞ وﻣﻦ ﲨﯿﻊ إﺟﺮاءاﺗﻪ وﻻﯾﻨﺼﺢ ﺑﺈﺳﺘﺨﺪاﻣﻪ ﻛﺜﲑا إﱃ ﻋﻨﺪ اﳊﺎﺟﺔ إﻟﯿﻪ.وأﳘﻬﺎ أي أن اﳌﺘﻐﲑ ﺧﺎص ﲟﻠﻒ ﻣﻌﲔ أو إﺟﺎر ﻣﻌﲔ أو ﻃﺒﻘﺔ ﻣﻌﯿﻨﺔ إذاأردت إﺳﺘﺨﺪام ﺑﺮﻧﺎﻣﺞ ﺿﻤﻦ ﻃﺒﻘﺔ ﻣﻌﯿﻨﺔ إﺟﺮاءات ﻣﻌﯿﻨﺔ أو ﻋﺪة إﺟﺮاءات ﻣﻌﯿﻨﺔ ﻓﺘﺤﺪد اﳌﺘﻐﲑprivate أي أن اﳌﺘﻐﲑ ﺿﻤﻦ إﺟﺮاء ﳏﺪد إذا أردت إﺳﺘﺨﺪام اﳌﺘﻐﲑ داﺧﻞ إﺟﺮاء ﳏﺪد
(
(
Public
Public c_name As String
Private
Private value As String
Dim i As Integer
Dim
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Condition ﺍﻟﻌﺒﺎﺭﺍﺕ ﺍﻟﺸﺮﻃﻴﺔ IF ﺍﻟﻌﺒﺎﺭﺓ ﺍﻟﺸﺮﻃﻴﺔ
١
اﻟﺘﺤﻜﻢ ﰲ ﺳﲑ اﻟﱪﻧﺎﻣﺞ ﺣﺴﺐ ﺷﺮط ﻣﻌﲔ ﯾﺘﻢ ﺗﻨﻔﯿﺬ ﻋﺒﺎرة| أو ﯾﺘﻢ ﺗﻨﻔﯿﺬ ﻋﺒﺎرة أﺧﺮى ﻣﺜﺎﻝ ﺗﻮﺿﻴﺤﻲ If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" End If If TextBox1.Text >= 50 Then TextBox2.Text = "PASS" End If IF ﻣﻜﻮﻧﺎﺕ ﺍﻟﻌﺒﺎﺭﺓ ﺍﻟﺸﺮﻃﻴﺔ If
TextBox1.Text < 50 Then ﺍﻟﺸﺮﻁ condition
ﺃﺩﺍﺓ ﺍﻟﺸﺮﻁ TextBox2.Text = "FAIL" ﺟﻮاب اﻟﺸﺮط ﳝﻜﻦ وﺿﻊ أﻛﺜﺮ ﻣﻦ ﻋﺒﺎرة ﳉﻮاب اﻟﺸﺮط ﻟﯿﺘﻢ ﺗﻨﻔﯿﺬﻫﺎ إذا ﲢﻘﻖ اﻟﺸﺮط End If ﺎﯾﺔ أداة اﻟﺸﺮط
: ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 TextBox1 TextBox2 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" End If If TextBox1.Text >= 50 Then TextBox2.Text = "PASS" End If
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
2
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Else elseﳝﻜﻨﻚ إﺳﺘﺨﺪام ﻋﺒﺎرة اﳌﺘﻜﺮرةif ﻟﻠﺤﺪ ﻣﻦ ﻋﺒﺎرات if ﻻﺣﻆ اﳊﺎﻟﺔ اﻟﺴﺎﺑﻘﺔ ﻛﺮرﻧﺎ أﻛﺜﺮ ﻣﻦ ﲨﻠﺔ
If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" Else TextBox2.Text = "PASS" End If If ﺃﺩﺍﺓ ﺍﻟﺸﺮﻁ TextBox2.Text = "FAIL" ﺟﻮاب اﻟﺸﺮط ﰲ ﺣﺎﻟﺔ ﺻﺤﺔ اﻟﺸﺮط ﳝﻜﻦ وﺿﻊ أﻛﺜﺮ ﻣﻦ ﻋﺒﺎرة ﳉﻮاب اﻟﺸﺮط ﻟﯿﺘﻢ ﺗﻨﻔﯿﺬﻫﺎ إذا ﲢﻘﻖ اﻟﺸﺮط Else
TextBox1.Text < 50 conditionﺍﻟﺸﺮﻁ
Then
TextBox2.Text = "PASS" ﰲ ﺣﺎﻟﺔ إذا ﱂ ﯾﺘﺤﻘﻖ اﻟﺸﺮط أي ﰲ ﺣﺎﻟﺔ ﺧﻄﺄ اﻟﺸﺮط End If ﺎﯾﺔ أداة اﻟﺸﺮط : ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 TextBox1 TextBox2 Button1
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" Else TextBox2.Text = "PASS" End If
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
3 Elseif إذا ﻛﺎن ﻫﻨﺎك أﻛﺜﺮ ﻣﻦ ﺷﺮط ﻟﯿﺲ ﺷﺮﻃﲔ ﻓﻘﻂ أﻛﺜﺮ ﻣﻦ ذﻟﻚ else if ﻓﻬﻨﺎ ﯾﻨﺒﻐﻲ إﺳﺘﺨﺪام : وﻛﻞ ﺷﺮط ﻟﻪ ﺟﻮاب ﺷﺮط ﻛﻤﺎ ﯾﻠﻲ If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" ElseIf TextBox1.Text < 70 Then TextBox2.Text = "Good" ElseIf TextBox1.Text < 90 Then TextBox2.Text = "Very good" ElseIf TextBox1.Text = 100 Then TextBox2.Text = "Excellent" End If : ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 TextBox1 TextBox2 Button1
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد ﻣﻼﺣﻈﺔ ﻫﺎﻣﺔ ﳝﻜﻦ إﺳﺘﺨﺪاﻣﻬﺎ ﰲ اﳊﯿﺎة اﻟﻌﻤﻠﯿﺔ ﰲ ﺑﺮاﻣﺞ درﺟﺎت اﻟﻄﻼب ﺑﺮاﻣﺞ ﻛﻨﱰول اﻟﺪرﺟﺎت ﻟﻔﺮز اﻟﻄﻼب ﺣﺴﺐ درﺟﺎﲥﻢ
If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" ElseIf TextBox1.Text < 70 Then TextBox2.Text = "Good" ElseIf TextBox1.Text < 90 Then TextBox2.Text = "Very good" ElseIf TextBox1.Text = 100 Then TextBox2.Text = "Excellent" End If
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
4 If - ElseIf - Else Else إذا ﱂ ﯾﺘﺤﻘﻖ أي ﺷﺮط ﻣﻦ اﻟﺸﺮوط ﯾﺘﻢ ﺗﻄﺒﯿﻖ ﻣﺎ ﺑﻌﺪ If TextBox1.Text < 50 Then TextBox2.Text = "FAIL" ElseIf TextBox1.Text < 70 Then TextBox2.Text = "Good" ElseIf TextBox1.Text < 90 Then TextBox2.Text = "Very good" ElseIf TextBox1.Text = 100 Then TextBox2.Text = "Excellent" Else TextBox2.Text = "Very Excellent" End If
: ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 TextBox1 TextBox2 Button1
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
If TextBox1.Text < 50 Then TextBox2.Text = "FAIL"
ﻣﻼﺣﻈﺔ ﻫﺎﻣﺔ ﳝﻜﻦ إﺳﺘﺨﺪاﻣﻬﺎ ﰲ اﳊﯿﺎة اﻟﻌﻤﻠﯿﺔ ﰲ ﺑﺮاﻣﺞ درﺟﺎت اﻟﻄﻼب ﺑﺮاﻣﺞ ﻛﻨﱰول اﻟﺪرﺟﺎت ﻟﻔﺮز اﻟﻄﻼب ﺣﺴﺐ درﺟﺎﲥﻢ
ElseIf TextBox1.Text < 70 Then TextBox2.Text = "Good" ElseIf TextBox1.Text < 90 Then TextBox2.Text = "Very good" ElseIf TextBox1.Text = 100 Then TextBox2.Text = "Excellent" Else TextBox2.Text = "Very Excellent" ﰲ ﺣﺎﻟﺔ إذا ﱂ ﯾﺘﺤﻘﻖ أي ﺷﺮط ﻣﻦ اﻟﺸﺮوط End If
ﺃﺩﺍﺓ ﺍﻟﺸﺮﻁ ﻭﺳﻮﻑ ﺗﺤﺘﺎﺟﻬﺎ ﻓﻲ ﺑﺮﺍﻣﺠﻚ ﻛﺜﻴﺮﺍﹰIf ﻫﺬﻩ ﺃﻓﻀﻞ ﻃﺮﻕ If - ElseIf – Else
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
5
ﻓﻲ ﺳﻄﺮ ﻭﺍﺣﺪ ﻛﻤﺎ ﻳﻠﻲif ﻧﻜﺘﺐ If If If If
TextBox1.Text TextBox1.Text TextBox1.Text TextBox1.Text
= = = =
1 2 3 4
Then Then Then Then
وذﻟﻚ ﻹﺧﺘﺼﺎر اﳌﺴﺎﺣﺔ اﳌﺴﺘﺨﺪﻣﺔ وذﻟﻚ ﻟﻘﯿﻢ ﳏﺪدة ﻟﻜﻞ ﻣﻨﻬﺎ ﺟﻮاب ﺷﺮط وﻫﺬا ﻏﲑ ﻣﻔﯿﺪة وﻟﻜﻦ ﻓﯿﺠﻮال ﺑﯿﺴﯿﻚ دوت ﻧﺖ ﯾﺪﻋﻤﻬﺎ وﳝﻜﻦ أن ﲢﺘﺎج ﳍﺎ ﰲ ﺑﺮاﳎﻚ TextBox2.Text = "Fail" TextBox2.Text = "Good" TextBox2.Text = "Very Good" TextBox2.Text = "Excellent" : ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ
Form1 TextBox1 TextBox2 Button1
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ If If If If
TextBox1.Text TextBox1.Text TextBox1.Text TextBox1.Text
= = = =
1 2 3 4
اﻟﻜﻮد Then Then Then Then
TextBox2.Text TextBox2.Text TextBox2.Text TextBox2.Text
= = = =
"Fail" "Good" "Very Good" "Excellent"
COMPARE ﻣﻌﺎﻣﻼﺕ ﺍﻟﻤﻘﺎﺭﻧﺔ ﻭﻫﻲIF ﺇﺳﺘﺨﺪﻣﻨﺎﻫﺎ ﺳﺎﺑﻘﺎﹰ ﻣﻊ MATH رﯾﺎﺿﺔ 1 < أﺻﻐﺮ 2 > أﻛﱪ 3 = ﻣﺴﺎواة 4 <> ﻻﯾﺴﺎوي 5 <= أﺻﻐﺮ ﻣﻦ أوﯾﺴﺎوي 6 >= أﻛﱪ ﻣﻦ أوﯾﺴﺎوي
mmbadweym@yahoo.com
(
< > = ≠
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Logicalﺍﻟﻤﻌﺎﻣﻼﺕ ﺍﻟﻤﻨﻄﻘﻴﺔ Boolean ﺃﻱ ﻣﺘﻐﻴﺮFalse ﺃﻭTrue ﻫﻲ ﺍﻟﺘﻲ ﺗﺮﺟﻊ ﻗﻴﻢ ﺗﺴﺘﺨﺪم ﻟﻌﻤﻠﯿﺔ دﻣﺞ اﻟﺸﺮوط ﺣﺴﺐ ﻣﻌﺎﯾﲑ اﻟﺸﺮﻃﲔ ﺻﺤﯿﺤﲔ أﺣﺪ اﻟﺸﺮﻃﲔ ﺻﺤﯿﺢ
And
1
True False ﻳﻤﻜﻨﻚ ﺇﺳﻨﺎﺩ ﻗﻴﻢ ﻭﺟﺮﺏ ﺑﻨﻔﺴﻚ
Dim a, b, c As Integer Dim d As Boolean If a > b And a > c Then TextBox1.Text = "Excellnt" End If
a=10 b=5 c=2
ﺑﺎﻗﻲ ﺍﻟﺤﺎﻻﺕ ﺧﻄﺄ
If Not d = True Then TextBox2.Text = "Good"
Or
2
اﻟﺸﺮﻃﲔ ﺻﺤﯿﺤﲔ
True
أﺣﺪ اﻟﺸﺮﻃﲔ ﺻﺤﯿﺢ
True ﺑﺎﻗﻲ ﺍﻟﺤﺎﻻﺕ ﺧﻄﺄ
3
4
Xor
Not
اﻟﺸﺮﻃﲔ ﺻﺤﯿﺤﲔ
false
أﺣﺪ اﻟﺸﺮﻃﲔ ﺻﺤﯿﺢ اﻟﺸﺮﻃﲔ ﺧﻄﺄ
True false
True >>>
False
False >>>
True
ﺑﺎﻗﻲ ﺍﻟﺤﺎﻻﺕ ﺧﻄﺄ
ﻳﺴﺘﺤﺪﻡ ﻟﻌﻜﺲ ﺍﻟﻘﻴﻤﺔ
: ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 TextBox1 TextBox2 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim a, b, c As Integer Dim d As Boolean If a > b And a > c Then TextBox1.Text = "Excellnt" End If If Not d = True Then TextBox2.Text = "Good"
mmbadweym@yahoo.com
(
(
ﳝﻜﻨﻚ إﺳﻨﺎد ﻗﯿﻢ a=5 b=6 c=8 أو ﺣﺴﺐ ﻣﺎﺗﺮﯾﺪ وﺟﺮب
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Condition ﺍﻟﻌﺒﺎﺭﺍﺕ ﺍﻟﺸﺮﻃﻴﺔ select ﻋﺒﺎﺭﺓ
ﻭﻫﻲ ﺃﺳﻬﻞ ﻓﻲ ﺍﻹﺳﺘﺨﺪﺍﻡ ﻭﺗﺴﻠﺴﻞ ﺍﻷﻓﻜﺎﺭif ﺗﻌﻮﺽ ﻋﺪﺓ ﻋﺒﺎﺭﺍﺕ
Select Case TextBox1.text Case Is < 50 TextBox2.Text = "fail" Case Is < 70 TextBox2.Text = "good" Case 70 To 89 TextBox2.Text = "Very Good" Case Else TextBox2.Text = "Excellent" End Select
ﺷﺮﺡ ﻣﻔﺼﻞ
إﯾﻀﺎح
Select Case Select ﺑﺪﺍﻳﺔ ﻋﺒﺎﺭﺓ
TextBox1.Text
Is ﺗﺪل ﻋﻠﻰ ﻗﻤﯿﺔ ﳏﺪدة
Case Is
< 50 ﻫﻨﺎ ﺗﻀﻊ ﺍﻟﺸﺮﻁ ﺍﻷﻭﻝ
ﳝﻜﻦ وﺿﻊ أﻛﺜﺮ ﻣﻦ ﻋﺒﺎرة ﳉﻮاب اﻟﺸﺮط، ﻫﻨﺎ ﺗﻀﻊ ﺟﻮاب ﻟﻠﺸﺮط اﻷول
TextBox2.Text = "fail" Case Is
To ﺗﺪل ﻋﻠﻰ ﻗﻤﯿﺔ ﰲ ﻧﻄﺎق
TextBox1 ﺍﻟﻘﻴﻤﺔ ﺍﻟﺘﻲ ﻳﺘﻢ ﺍﻟﻔﺤﺺ ﺣﺴﺒﻬﺎ ﺍﻟﻤﻌﻮﺽ ﻋﻨﻪ ﻓﻲ
< 70 ﻫﻨﺎ ﺗﻀﻊ ﺍﻟﺸﺮﻁ ﺍﻟﺜﺎﻧﻲ ﳝﻜﻦ وﺿﻊ أﻛﺜﺮ ﻣﻦ ﻋﺒﺎرة ﳉﻮاب اﻟﺸﺮط، ﻫﻨﺎ ﺗﻀﻊ ﺟﻮاب ﻟﻠﺸﺮط اﻟﺜﺎﻧﻲ
TextBox2.Text = "good" Case
70 To 89 ﻫﻨﺎ ﺗﻀﻊ ﺍﻟﺸﺮﻁ ﺍﻟﺜﺎﻟﺚ
ً ﰲ ﺑﺮاﻣﺞ ﻗﻮاﻋﺪ ﺧﻠﻲ ﺑﺎﻟﻚ ﻫﺬه اﻟﻌﺒﺎرة ﻣﻔﯿﺪة ﺟﺪا اﻟﺒﯿﺎﻧﺎت إﺳﺘﺬﻛﺮﻫﺎ داﺋﻤﺎ ً درﺟﺎت ﻃﻼب وﻣﻨﻬﺎ ﲢﺪﯾﺪ اﻟﺘﻘﺪﯾﺮ ﳑﺘﺎز- ً ﺟﯿﺪ – ﺟﯿﺪ ﺟﺪا- ﻣﻘﺒﻮل ﳝﻜﻦ وﺿﻊ أﻛﺜﺮ ﻣﻦ ﻋﺒﺎرة ﳉﻮاب اﻟﺸﺮط، ﻫﻨﺎ ﺗﻀﻊ ﺟﻮاب ﻟﻠﺸﺮط اﻟﺜﺎﻟﺚ
TextBox2.Text = "Very Good"
ﻫﻨﺎ ﺗﻀﻊ ﺟﻮاب إذا ﱂ ﯾﺘﺤﻘﻖ أي ﻣﻦ اﻟﺸﺮوط اﻟﺴﺎﺑﻘﺔ
Case Else TextBox2.Text = "Excellent" End Select
ﳝﻜﻦ وﺿﻊ أﻛﺜﺮ ﻣﻦ ﻋﺒﺎرة ﳉﻮاب اﻟﺸﺮط ﻧﻬﺎﻳﺔ ﻋﺒﺎﺭﺓSelect
: ﻣﺜﺎﻝ
Button1_Click
ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 TextBox1 TextBox2 Button1 Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ اﻟﻜﻮد Select Case TextBox1.text Case Is < 50 TextBox2.Text = "fail" Case Is < 70 TextBox2.Text = "good"
ﳝﻜﻨﻚ إﺳﻨﺎد ﻗﯿﻢ a=5 b=6 c=8 أو ﺣﺴﺐ ﻣﺎﺗﺮﯾﺪ وﺟﺮب
Case 70 To 89 TextBox2.Text = "Very Good" Case Else TextBox2.Text = "Excellent" End Select
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
Loopsﺍﻟﺤﻠﻘﺎﺕ For ﺣﻠﻘﺔ
(١
for ﺗﻘﻮﻡ ﺑﺘﻜﺮﺍﺭ ﺍﻷﻭﺍﻣﺮ ﻋﺪﺩ ﻣﻦ ﺍﻟﻤﺮﺍﺕ ﺣﺴﺐ ﻋﺪﺩ ﺍﻟﻤﺮﺍﺕ ﺍﻟﻤﻮﺟﻮﺩﺓ ﻓﻲ ﺣﻠﻘﺔ ﻭﻳﺘﻢ ﻭﺿﻌﻬﺎ ﺑﺎﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻲ
Dim i As Integer For i = 1 To 10 Console.WriteLine(i) Next i
ﺷﺮﺡ ﻣﻔﺼﻞ ﺃﻭﻻﹰ ﺍﻹﻋﻼﻥ ﻋﻦ ﺍﻟﻤﺘﻐﻴﺮ integr counter ﺛﺎﻧﻴﺎﹰ counter
Dim i As Integer
For
i = 1 To 10 ﺍﻟﻌﺪﺍﺩ counter
Console.WriteLine(i) Next i
ﺛﺎﻟﺜﺎﹰ ﻳﺘﻢ ﺗﻜﺮﺍﺭ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺣﺴﺐ ﺍﻟﻌﺪﺍﺩ i ﺭﺍﺑﻌﺎﹰ ﺗﻜﺮﺍﺭ : ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ
Button1_Click
Form1 Button1 Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim i As Integer For i = 1 To 10 Console.WriteLine(i) Console.WriteLine("hello") Console.WriteLine() Next i View – Other Windows – Output (Ctrl+Alt+O)
mmbadweym@yahoo.com
(
ﻋﺮض ﻧﺎﺗﺞ اﻟﱪﻧﺎﻣﺞ
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
Step <<< For ﺣﻠﻘﺔ
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
(٢
ﺑﻤﻘﺪﺍﺭ ﺗﺤﺪﺩﻩfor ﻳﺰﻳﺪ ﻋﺪﺍﺩStep ﺇﺳﺘﺨﺪﺍﻡ ﺍﻟﻌﺒﺎﺭﺓ
ﻳﺰﻳﺪ ﺑﻤﻘﺪﺍﺭ ﻭﺍﺣﺪcounter ﻷﻥ ﺍﻟﻮﺿﻊ ﺍﻟﻄﺒﻴﻌﻲ ﻟﻠﻌﺪﺍﺩ Dim i As Integer For i = 1 To 10 Step 2 Console.WriteLine(i) Next i
: ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1
Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد ﻣﻼﺣﻈﺔ ﻋﺮض اﻷرﻗﺎم اﻟﺰوﺟﯿﺔ ﻓﻘﻂ ﳑﻜﻦ ﰲ ﻓﻜﺮة ﺑﺮﻧﺎﻣﺞ ﻋﺮض اﻟﺰوﺟﻲ واﻟﻔﺮدي
Dim i As Integer For i = 0 To 10 Step 2 Console.WriteLine(i) Console.WriteLine("hello") Console.WriteLine() Next i View – Other Windows – Output Ctrl+Alt+O ﻋﺮض ﻧﺎﺗﺞ اﻟﱪﻧﺎﻣﺞ
For ( ﺍﻟﺨﺮﻭﺝ ﻣﻦ ﺣﻠﻘﺔ٣ if Dim i As Integer For i = 1 To 10 If i = 10 Then Exit For Console.WriteLine(i) Next i
mmbadweym@yahoo.com
(
(
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(٤
ﻋﻠﻤﻨﺎﹶ ﺳﺎﺑﻘﺎﹰ ﺣﻠﻘﺔ For
(
mmbadweym@yahoo.com
email
ﺣﻠﻘﺔ While
ﺗﻘﻮﻡ ﺑﺘﻜﺮﺍﺭ ﺍﻷﻭﺍﻣﺮ ﻋﺪﺩ ﻣﻦ ﺍﻟﻤﺮﺍﺕ ﺣﺴﺐ ﻋﺪﺩ ﺍﻟﻤﺮﺍﺕ ﺍﻟﻤﻮﺟﻮﺩﺓ ﻓﻲ ﺣﻠﻘﺔ forﺃﻱ ﺑﻌﺪﻫﺎ ﻭﻳﺘﻢ ﻭﺿﻌﻬﺎ ﺑﺎﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻲ Dim i As Integer For i = 1 To 10 Step 2 )Console.WriteLine(i Next i
ﺃﻣﺎ ﻫﻨﺎ ﺣﻠﻘﺔ While ﺗﻘﻮﻡ ﺑﺘﻜﺮﺍﺭ ﺍﻷﻭﺍﻣﺮ ﻋﺪﺩ ﻣﻦ ﺍﻟﻤﺮﺍﺕ ﺣﺴﺐ ﺍﻟﺸﺮﻁ ﺑﻌﺪ while ﻭﻳﺘﻢ ﻭﺿﻌﻬﺎ ﺑﺎﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻲ
Dim i As Integer i = 1 While i < 11 )Console.WriteLine(i i = i + 1 End While
ﺷﺮﺡ ﻣﻔﺼﻞ ﺃﻭﻻﹰ
Dim i As Integer i = 1 إﺳﻨﺎد ﻗﯿﻤﺔ ﻣﺒﺪﺋﯿﺔ ﳌﺘﻐﲑ i ﻷن اﻟﻮﺿﻊ اﻹﻓﱰاﺿﻲ ﯾﺒﺪأ ﻣﻦ ﺻﻔﺮ
ﺍﻹﻋﻼﻥ ﻋﻦ ﺍﻟﻤﺘﻐﻴﺮ ﻻﺣﻆ ﺍﻟﻤﺘﻐﻴﺮ ﻋﺪﺩ ﺻﺤﻴﺢintegr ﻷﻧﻬﺎ ﺗﻌﺘﺒﺮ ﻛﺄﻧﻬﺎ ﻋﺪﺍﺩcounter ﺍﻟﻌﺪﺍﺩ ﻳﺘﻌﺎﻣﻞ ﻣﻊ ﺍﻷﺭﻗﺎﻡ ﺛﺎﻧﻴﺎﹰ
i < 11
ﻳﺘﻢ ﻭﺿﻊ ﺍﻟﺸﺮﻁ ﺃﻱ ﻧﻔﺪ ﺑﻴﻨﻤﺎ i<11 ﺛﺎﻟﺜﺎﹰ :ﻳﺘﻢ ﺗﻜﺮﺍﺭ ﺍﻟﻌﺒﺎﺭﺍﺕ ﻭﺻﻮﻻﹰ ﻟﻠﺸﺮﻁ i<11
While ﺑﺪاﯾﺔﺣﻠﻘﺔ While
ﺍﻟﺸﺮﻁ Condition )Console.WriteLine(i i = i + 1
ﻳﺘﻢ ﺍﻟﺨﺮﻭﺝ ﻣﻦ ﺣﻠﻘﺔ While
(
End While ﺎﯾﺔ ﺣﻠﻘﺔ While
(
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
DO ( ﺣﻠﻘﺔ٥ Do While ﺗﻘﻮﻡ ﺑﺘﻜﺮﺍﺭ ﺍﻷﻭﺍﻣﺮ ﻋﺪﺩ ﻣﻦ ﺍﻟﻤﺮﺍﺕ ﺣﺴﺐ ﺍﻟﺸﺮﻁ ﺑﻌﺪWhile ﻭﻫﻲ ﻣﺸﺎﺑﻬﺔ ﺣﻠﻘﺔ
ﻭﻟﻜﻨﻬﺎ ﻣﺨﺘﻠﻔﺔ ﺑﻌﺾ ﺍﻟﺸﻲﺀ
Dim i As Integer
Dim i As Integer
i = 1
i = 1
اﻟﺸﺮط
Do While i < 0
Do
Console.WriteLine(i) i = i + 1
Console.WriteLine(i) i = i + 1
Loop
Loop While i < 0
اﻟﺸﺮط DO
DO
Dim i As Integer
Dim i As Integer
i = 1
i = 1
Do Until i > 10 ١٠ أﻛﺒﺮ ﻣﻦi اﻟﺸﺮط ﻋﻜﺴﻨﺎ ھﻨﺎ اﻟﺸﺮط إﻓﻌﻞ ﺣﺘﻰ
Do
أﺧﺮج ﻣﻦ ﺗﻨﻔﯿﺬ اﻟﻌﺒﺎرات
Console.WriteLine(i) i = i + 1
Console.WriteLine(i)
Loop Until i > 10
١٠ أﻛﺒﺮ ﻣﻦi اﻟﺸﺮط ﻋﻜﺴﻨﺎ ھﻨﺎ اﻟﺸﺮط إﻓﻌﻞ ﺣﺘﻰ
i = i + 1
أﺧﺮج ﻣﻦ ﺗﻨﻔﯿﺬ اﻟﻌﺒﺎرات
Loop
mmbadweym@yahoo.com
(
(
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﻣﺜﺎﻝ ﻻﺑﺪ ﺃﻥ ﻳﻄﺒﻖ ﻟﺘﺄﻛﺪ ﺑﻨﻔﺴﻚ ﻭﺗﻼﺣﻆ ﺍﻟﻔﺮﻕ ﻓﻲ )View – Other Windows – Output(Ctrl+Alt+O ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ Button1
اﻟﻜﻮد
Button1_Click
Dim i As Integer
Dim i As Integer
i = 1
i = 1
اﻟﺸﺮط
Do
Do While i < 0
)Console.WriteLine(i i = i + 1
)Console.WriteLine(i i = i + 1
Loop While i < 0
Loop
اﻟﺸﺮط ﻳﺘﻢ ﺗﻨﻔﻴﺬ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺑﻌﺪ DOﻣﺮﺓ ﻭﺍﺣﺪﺓ ﻗﺒﻞ ﺍﻟﺘﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﻳﺘﻢ ﺗﻨﻔﻴﺬ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺑﻌﺪ DOﺇﻻ ﺑﻌﺪ ﺍﻟﺘﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﺗﻌﻨﻲ ﺑﺎﻟﺘﺮﺟﻤﺔ ﻟﻠﻌﺮﺑﻴﺔ ﺇﻓﻌﻞ ﺍﻟﻌﺒﺎﺭﺍﺕ ﻣﺮﺓ ﺛﻢ ﺗﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﺗﻌﻨﻲ ﺑﺎﻟﺘﺮﺟﻤﺔ ﻟﻠﻌﺮﺑﻴﺔ ﺇﻓﻌﻞ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺑﻴﻨﻤﺎ ﺗﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﻣﺜﺎﻝ ﻻﺑﺪ ﺃﻥ ﻳﻄﺒﻖ ﻟﺘﺄﻛﺪ ﺑﻨﻔﺴﻚ ﻭﺗﻼﺣﻆ ﺍﻟﻔﺮﻕ ﻓﻲ
) – View – Other Windows
Output(Ctrl+Alt+O ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ Button1
اﻟﻜﻮد
Button1_Click
Dim i As Integer
Dim i As Integer
i = 1
i = 1 اﻟﺸﺮط ﻋﻜﺴﻨﺎ ھﻨﺎ اﻟﺸﺮط إﻓﻌﻞ ﺣﺘﻰ iأﻛﺒﺮ ﻣﻦ ١٠
Do
Do Until i > 10
أﺧﺮج ﻣﻦ ﺗﻨﻔﯿﺬ اﻟﻌﺒﺎرات
)Console.WriteLine(i i = i + 1 اﻟﺸﺮط ﻋﻜﺴﻨﺎ ھﻨﺎ اﻟﺸﺮط إﻓﻌﻞ ﺣﺘﻰ iأﻛﺒﺮ ﻣﻦ ١٠
)Console.WriteLine(i
Loop Until i > 10
i = i + 1
أﺧﺮج ﻣﻦ ﺗﻨﻔﯿﺬ اﻟﻌﺒﺎرات
Loop ﻳﺘﻢ ﺗﻨﻔﻴﺬ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺑﻌﺪ DOﻣﺮﺓ ﻭﺍﺣﺪﺓ ﻗﺒﻞ ﺍﻟﺘﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﻳﺘﻢ ﺗﻨﻔﻴﺬ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺑﻌﺪ DOﺇﻻ ﺑﻌﺪ ﺍﻟﺘﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﺗﻌﻨﻲ ﺑﺎﻟﺘﺮﺟﻤﺔ ﻟﻠﻌﺮﺑﻴﺔ ﺇﻓﻌﻞ ﺍﻟﻌﺒﺎﺭﺍﺕ ﻣﺮﺓ ﺣﺘﻰ ﺗﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
ﺗﻌﻨﻲ ﺑﺎﻟﺘﺮﺟﻤﺔ ﻟﻠﻌﺮﺑﻴﺔ ﺇﻓﻌﻞ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺣﺘﻰ ﺗﺤﻘﻖ ﻣﻦ ﺍﻟﺸﺮﻁ
(
(
mmbadweym@yahoo.com
email
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﺍﻟﺤﻠﻘﺎﺕ ﺍﻟﻤﺘﺪﺍﺧﻠﺔLoops ﻳﻤﻜﻨﻚ ﻋﻤﻞ ﻋﻼﻗﺎﺕ ﺩﺍﺧﻞ ﺑﻌﻀﻬﺎ ﺍﻟﺒﻌﺾ ﻭﺫﻟﻚ ﻛﻤﺎ ﻳﻠﻲ Dim i, j As Integer For i = 1 To 10 For j = 1 To 10 )" " & Console.Write(i * j Next j )(Console.WriteLine Next i ﺷﺮﺡ ﻣﻔﺼﻞ ﯾﺘﻢ اﻟﺪﺧﻮل ﻟﻠﺤﻠﻘﺔ اﳋﺎرﺟﯿﺔ iأوﻻ ﺑﻘﯿﻤﺘﻬﺎ اﻷوﱄ ﰒ ﯾﺘﻢ ﺗﻨﻔﯿﺬ اﳊﻠﻘﺔ اﻟﺪاﺧﻠﯿﺔ jﲨﯿﻌﻬﺎ وﻋﻨﺪ اﻹﻧﺘﻬﺎء ﯾﺒﺪأ ﻣﻦ اﳊﻠﻘﺔ اﳋﺎرﺟﯿﺔ وﻫﻜﺬا وﺳﻮف ﯾﺘﻀﺢ أﻛﺜﺮ ﻋﻨﺪ ﺗﻨﻔﯿﺬ اﳌﺜﺎل اﻟﻌﻤﻠﻲ ﺃﻭﻻﹰ
Dim i, j As Integer
ﺍﻹﻋﻼﻥ ﻋﻦ ﺍﻟﻤﺘﻐﻴﺮ ﻻﺣﻆ ﺍﻟﻤﺘﻐﻴﺮ ﻋﺪﺩ ﺻﺤﻴﺢintegr ﻷﻧﻬﺎ ﺗﻌﺘﺒﺮ ﻛﺄﻧﻬﺎ ﻋﺪﺍﺩcounter ﺍﻟﻌﺪﺍﺩ ﻳﺘﻌﺎﻣﻞ ﻣﻊ ﺍﻷﺭﻗﺎﻡ ﺛﺎﻧﻴﺎﹰ
i = 1 To 10
ﻳﻮﺿﻊ ﻗﻴﻤﺔ ﺍﻟﻤﺘﻐﻴﺮ
ﺍﻟﻌﺪﺍﺩ counter
ﺍﻟﻌﺪﺍﺩcounter j = 1 To 10 j = 1 To 10
i=1 i=2 ﻭﺻﻮﻻﹰ i=10
For
ﺛﺎﻟﺜﺎﹰ
For j = 1 To 10
ﻳﺘﻢ ﺗﻜﺮﺍﺭ ﺍﻟﻌﺒﺎﺭﺍﺕ ﺣﺴﺐ ﺍﻟﻌﺪﺍﺩ i=1 ﺛﻢ ﻳﺒﺪﺃ ﺗﻜﺮﺍﺭ ﻋﺪﺍﺩ jﺇﻟﻰ ﺃﻥ ﻳﻨﺘﻬﻲ ﺛﻢ ﻳﺘﺘﺎﻟﻰ ﻋﺪﺍﺩ i
)" " & Console.Write(i * j ﻫﺬا ﯾﺪل ﻋﻠﻰ ﻧﺎﺗﺞ ﰲ ﻧﻔﺲ اﻟﺴﻄﺮ ﻣﻊ ﺗﺮك ﻣﺴﺎﻓﺎت Next j )(Console.WriteLine ﻫﺬا ﯾﺪل ﺳﻄﺮ ﺟﺪﯾﺪ Next i
(
(
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
: ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim i, j As Integer For i = 1 To 10 For j = 1 To 10 Console.Write(i * j & " Next j Console.WriteLine() Next i
")
View – Other Windows – Output (Ctrl+Alt+O) ﻋﺮض ﻧﺎﺗﺞ اﻟﱪﻧﺎﻣﺞ ١٠ إﱃ١ ﺳﻮف ﺗﻼﺣﻆ اﻟﻨﺘﺎﺋﺞ ﺟﺪول اﻟﻀﺮب ﻣﻦ
١٠ ﺇﻟﻰ١ ﻋﻤﻞ ﺟﺪﻭﻝ ﺍﻟﻀﺮﺏ ﻣﻦ: ﻣﺜﺎﻝ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim i, j As Integer For i = 1 To 10 For j = 1 To 10 Console.Write(i & "×" & j & "=" & i * j & " Next j Console.WriteLine() Console.WriteLine() ﻫﺬا ﯾﻌﲏ ﺗﺮك ﺳﻄﺮ ﻓﺎرغ Next i
")
View – Other Windows – Output (Ctrl+Alt+O) ﻋﺮض ﻧﺎﺗﺞ اﻟﱪﻧﺎﻣﺞ ١٠ إﱃ١ ﺳﻮف ﺗﻼﺣﻆ اﻟﻨﺘﺎﺋﺞ ﺟﺪول اﻟﻀﺮب ﻣﻦ 1×1=1 1×2=2 1×3=3 1×4=4 1×5=5 1×6=6 1×7=7 1×8=8 1×9=9 1×10=10 2×1=2 2×2=4 2×3=6 2×4=8 2×5=10 2×6=12 2×7=14 2×8=16 2×9=18 2×10=20 3×1=3 3×2=6 3×3=9 3×4=12 3×5=15 3×6=18 3×7=21 3×8=24 3×9=27 3×10=30 4×1=4 4×2=8 4×3=12 4×4=16 4×5=20 4×6=24 4×7=28 4×8=32 4×9=36 4×10=40 5×1=5 5×2=10 5×3=15 5×4=20 5×5=25 5×6=30 5×7=35 5×8=40 5×9=45 5×10=50 6×1=6 6×2=12 6×3=18 6×4=24 6×5=30 6×6=36 6×7=42 6×8=48 6×9=54 6×10=60 7×1=7 7×2=14 7×3=21 7×4=28 7×5=35 7×6=42 7×7=49 7×8=56 7×9=63 7×10=70 8×1=8 8×2=16 8×3=24 8×4=32 8×5=40 8×6=48 8×7=56 8×8=64 8×9=72 8×10=80 9×1=9 9×2=18 9×3=27 9×4=36 9×5=45 9×6=54 9×7=63 9×8=72 9×9=81 9×10=90 10×1=10 10×2=20 10×3=30 10×4=40 10×5=50 10×6=60 10×7=70 10×8=80 10×9=90
mmbadweym@yahoo.com
(
(
10×10=100
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﻣﺜﺎﻝ ﻋﺎﻡ ١٠ ﺇﻟﻰ١ ﺟﻤﻊ ﺍﻷﻋﺪﺍﺩ ﻣﻦ ٥٥ = ١٠+٩+٨+٧+٦+٥+٤+٣+٢+١ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim i, sum As Integer sum = 0 ٠=ﻻﺣﻆ ﻣﻌﺎﻣﻞ اﳉﻤﻊ For i = 1 To 10 sum = sum + i Next i Console.WriteLine("sum=" & sum)
View – Other Windows – Output Ctrl+Alt+O ﻋﺮض ﻧﺎﺗﺞ اﻟﱪﻧﺎﻣﺞ ﺳﻮف ﺗﻼﺣﻆ اﻟﻨﺘﺎﺋﺞ sum=55 ١٠ ﺇﻟﻰ١ ﺿﺮﺏ ﺍﻷﻋﺪﺍﺩ ﻣﻦ ١٠ ﻣﻀﺮﻭﺏ 3628800=١٠×٩×٨×٧×٦×٥×٤×٣×٢×١ ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim i, Mul As Double Doubleﻷن ﻗﯿﻤﺔ اﻟﻀﺮب ﻗﺪ ﺗﻜﻮن ﻛﺒﲑةﻧﻮع اﳌﺘﻐﲑ Mul = 1 ١=ﻻﺣﻆ ﻣﻌﺎﻣﻞ اﻟﻀﺮب For i = 1 To 10 Mul = Mul * i Next i Console.WriteLine("Mul=" & Mul) View – Other Windows – Output Ctrl+Alt+O ﻋﺮض ﻧﺎﺗﺞ اﻟﱪﻧﺎﻣﺞ ﺳﻮف ﺗﻼﺣﻆ اﻟﻨﺘﺎﺋﺞ Mul=3628800
mmbadweym@yahoo.com
(
(
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
Visual Basic 2010 , ADO.NET, Crystal Report
(
mmbadweym@yahoo.com
email
ﺍﻟﻘﺮﺍﺀﺓ ﻣﻦ ﻣﻠﻒ ﺳﻮف ﻧﻘﻮم ﰲ ﻫﺬا اﻟﺪرس ﺑﻌﺪ أن ﺗﻌﻠﻤﻨﺎ اﳊﻠﻘﺎت إﺳﺘﺨﺪام اﳊﻠﻘﺎت ﻟﻠﻘﺮاءة ﻣﻦ ﻣﻠﻒ ﺃﻭﻻﹰ :ﺍﻹﻋﻼﻥ ﻋﻦ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ Dim F_Name As String
ﻫﺬﺍ ﺍﳌﺘﻐﲑ ﻳﻘﻮﻡ ﲝﻔﻆ ﺇﺳﻢ ﺍﳌﻠﻒ ﻣﻊ ﺇﻣﺘﺪﺍﺩﻩ .ﺃﻱ ﻧﻮﻋﻪString ﻫﺬﺍ ﺍﳌﺘﻐﲑ F_Read
Dim F_Read As System.IO.StreamReader
ﻣﻦ ﺍﻟﻨﻮﻉ ﻛﺎﺋـﻦ StreamReader ﻭﻫﻮ ﻋﺒﺎﺭﺓ ﻋﻦ ﺃﺣﺪ ﻛﺎﺋﻨﺎﺕ System.IO ﻭﻫﻲ ﻋﺒﺎﺭﺓ ﻋﻦ ﺩﻭﺍﻝ ﺍﳋﺮﺝ ﻭﺍﺍﻟﺪﺧﻞ ﻟﻠﻨﻈﺎﻡ ﻭﺃﺣﺪ ﻃﺮﻗﻬﺎ ﺃﻭ ﺃﺳﺎﻟﻴﺒﻬﺎ StreamReader ﻭﺗﺴﺘﺨﺪﻡ ﻟﻌﻤﻠﻴﺔ ﻓﺘﺢ ﺍﳌﻠﻒ ﻟﻠﻘﺮﺍﺀﺓ ﻭﳝﻜﻦ ﻓﺘﺢ ﺍﳌﻠﻒ ﻟﻠﻜﺘﺎﺑﺔ ﻋﻠﻴﻪ ﺑﺈﺳﺘﺨﺪﺍﻡ StreamWriter ﻧﻌﺮﻑ ﻣﺘﻐﲑ ﺃﺧﲑ ﻳﻘﻮﻡ ﲝﻔﻆ ﺍﻟﻨﺎﺗﺞ
Dim Result As String
ﺃﻭ ﺃﺳﻄﺮ ﺍﳌﻠﻒ ﺍﻟﻨﺼﻲ ﺍﻟﺬﻱ ﺳﻮﻑ ﻳﻔﺘﺢ ﺛﺎﻧﻴﺎﹰ :ﺇﺳﻨﺎﺩ ﻗﻴﻢ ﻟﻠﻤﺘﻐﻴﺮﺍﺕ ﺳﻮﻑ ﻧﺴﻨﺪ ﻟﻠﻤﺘﻐﲑ Resultﻓﺎﺭﻍ ﰒ ﻳﺘﻢ ﻣﻸ ﺍﳌﻠﻒ ﺍﻟﻨﺼﻲ ﺳﻄﺮﺍﹰ ﺳﻄﺮﺍﹰ
"" = Result
ﰒ ﳓﺪﺩ ﺇﺳﻢ ﺍﳌﻠﻒ ﻭﺇﻣﺘﺪﺍﺩﻩ
"F_Name = "test.txt
ﺍﳌﺘﻐﲑ ﻛﺎﺋﻦ
& "F_Read = System.IO.File.OpenText("c:// )F_Name
ﻧﺴﺘﺨﺪﻡ ﻣﻌﻪ ﺩﻭﺍﻝ ﺍﳌﻠﻔﺎﺕSystem.IO.File ﰒ OpenTextﻟﻔﺘﺢ ﺍﳌﻠﻒ ﺍﻟﺬﻱ ﻣﺴﺎﺭﻩ ﻳﺘﻢ ﻭﺿﻌﻪ ﺑﻴﲔ ﺇﺷﺎﺭﺍ ﺕ ﺍﻟﺘﻨﺼﻴﺺ ﻷﻧﻪ ﻧﺺ ﰒ ﻧﻀﻊ ﺇﺷﺎﺭﺓ & ﻟﻴﺘﻢ ﺩﻣﺞ ﺇﺳﻢ ﺍﳌﻠﻒ ﻣﻊ ﺍﳌﺴﺎﺭ ﺍﳋﺎﺹ ﺑﻪ ﻧﻘﻮﻡ ﺑﻌﻤﻞ ﺣﻠﻘﺔ ﺣﱴ ﻳﺘﻢ ﺍﻟﻮﺻﻮﻝ ﻟﻨﻬﺎﻳﺔ ﺍﳌﻠﻒ ﻳﺸﺎﺭ ﳍﺎ ﺑـ Nothing
Do Until Result Is Nothing
ﺃﻱ ﺣﱴ ﺗﺼﺒﺢ Result Is Nothing ﺃﻱ ﻳﺘﻢ ﺍﳋﺮﻭﺝ ﻣﻦ ﺍﳊﻠﻘﺔ ﻳﺘﻢ ﻭﺿﻊ ﺃﺳﻄﺮ ﺍﳌﻠﻒ ﺍﻟﻨﺎﺗﺞ ﺿﻤﻦ Result
Result = F_Read.ReadLine
ﺑﺈﺳﺘﺨﺪﺍﻡ ﺍﳌﺘﻐﲑ F_Readﰒ ﺍﻷﺳﻠﻮﺏ ReadLine ﰒ ﻃﺒﺎﻋﺔ Resultﻋﻠﻰ ﻧﺎﻓﺬﺓ ﺍﳋﺮﺝ View – Other Windows – Output Ctrl+Alt+O
)Console.WriteLine(Result
Loop
(
(
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
ﺃﻣﺜﻠﺔ ﻋﻤﻠﻴﺔ ﻟﻺﺳﺘﺬﻛﺎﺭ ﻭﺯﻳﺎﺩﺓ ﻓﻜﺮﻙ ﺇﻳﺠﺎﺩ ﺍﻷﺱ ﺍﻟﻌﺪﺩﻱ ﻟﻌﺪﺩ 23
i=2
j=3
ﺍﻹﻋﻼﻥ ﻋﻦ ﺍﻟﻤﺘﻐﻴﺮﺍﺕ: ﺃﻭﻻﹰ Dim i, j, n As Integer
ﺍﻹﻋﻼﻥ ﻋﻦ ﺍﳌﺘﻐﲑﺍﺕ ﻫﻮ ﺍﻟﻌﺪﺩ ﺍﻷﺳﺎﺳﻲi ﺣﻴﺚ ﻫﻮ ﺍﻷﺱj conunter ﻫﻮ ﻋﺪﺩ ﻣﺮﺍﺕ ﺍﻟﺘﻜﺮﺍﺭ ﺃﻱ ﻳﺄﺧﺬ ﺍﻟﻌﺪﺍﺩN ﻣﺘﻐﲑ ﻧﺎﺗﺞ ﺍﻟﻌﻤﻠﻴﺔ
Dim Result As Double ﺇﺳﻨﺎﺩ ﺍﻟﻘﻴﻢ: ﺛﺎﻧﻴﺎﹰ i = TextBox1.Text j = TextBox2.Text Result = 1
i,j ﺇﺳﻨﺎﺩ ﻗﻴﻢ ﻟﻠﻤﺘﻐﲑ
ﻣﻌﺎﻣﻞ اﻟﻀﺮب ﻫﺎم ﻋﻨﺪ وﺟﻮد أي ﻋﻤﻠﺒﺔ ﺿﺮب ﳚﺐ أن ﯾﻜﺘﺐ sum=0 ﻣﺜﻞ ﻣﻌﺎﻣﻞ اﳉﻤﻊ ﻋﻨﺪ وﺟﻮد أي ﻋﻤﻠﯿﺔ ﲨﻊ For n = 1 To j
counter ﻭﺑﻌﺪﻫﺎ ﺍﻟﻌﺪﺍﺩfor ﻧﻀﻊ ﺣﻠﻘﺔ n = 1 To j Result=1 ﻣﻌﺎﻣﻞ اﻟﻀﺮب i=2 Result = Result * i
n = 1 To j counter ﻋﺪﺍﺩ j=3 1 2 3
Result = Result * i Next n TextBox3.Text = result
Result=1*2=2 Result=2*2=4 Result=4*2=8 ﻣﺜﺎﻝ
ﻣﺘﻄﻠﺒﺎت اﻟﱪﻧﺎﻣﺞ Form1 Button1 TextBox1 TextBox2 TextBox3 Button1_Click
Button1 ﰲ ﺣﺪث اﻟﻨﻘﺮ
اﻟﻜﻮد
Dim i, j, n As Integer Dim result As Double i = TextBox1.Text j = TextBox2.Text result = 1 For n = 1 To j result = result * i Next n TextBox3.Text = result
mmbadweym@yahoo.com
(
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
(
mmbadweym@yahoo.com
email
ﺳﻮﻑ ﻧﺪﺭﺱ ﻓﻲ ﺍﻟﻔﺼﻮﻝ ﺍﻟﺘﺎﻟﻴﺔ ﺃﻏﻠﺐ ﺃﺩﻭﺍﺕ ﺍﻟﺘﺤﻜﻢ ﺍﻟﻤﻮﺟﻮﺩ ﻓﻲ ﺑﻴﺌﺔ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻚ ﺩﻭﺕ ﻧﺖ ﻭﺗﺴﺘﺨﺪﻡ ﺗﻠﻚ ﺍﻷﺩﻭﺍﺕ ﻟﻠﺘﻌﺎﻣﻞ ﻣﻊ ﺍﻟﻤﺴﺘﺨﺪﻡ ﻷﺧﺬ ﺍﻟﻨﺘﺎﺋﺞ ﻣﻨﻪ ﻭﺇﻋﻄﺎﺋﻪ ﺍﻟﻨﺘﺎﺋﺞ ﺃﻭ ﺇﺧﺘﻴﺎﺭ ﻋﻨﺎﺻﺮ ﻣﻌﻴﻨﺔ ﺃﻭ ﺑﻴﺎﻧﺎﺕ ﻣﻌﻴﻨﺔ ﺛﻢ ﺇﻋﻄﺎﺋﻪ ﺍﻟﻨﺘﺎﺋﺞ ﻟﻌﺮﺽ ﺃﺩﻭﺍﺕ ﺍﻟﺘﺤﻜﻢ
) View – Toolbox (Ctrl + Alt + x ﻭﺳﻨﺒﺪﺃ ﺑﺄﻭﻝ ﺃﺩﺍﺓ ﺃﻭ ﺃﻫﻢ ﺃﺩﺍﺓ ﻭﻫﻲ Pointer ﺍﻟﻤﺆﺷﺮ
١
-١ﺗﻘﻮﻡ ﻫﺬﻩ ﺍﻷﺩﺍﺓ ﺑﺈﺧﺘﻴﺎﺭ ﺍﻟﻌﻨﺎﺻﺮ ﻭﺗﻐﻴ ﻣﻜﺎﻧﻪ ﺗﺤﺮﻳﻜﻪ
-٢ﻋﻨﺪ ﺍﻟﺘﺄﺷ ﻋﻠﻰ ﺃﻱ ﻋﻨﺼﺮ ﻳﻈﻬﺮ ﻋﻠﻴﻪ handlesﺍﻟﺘﻲ ﺗﻤﻜﻨﺎ ﻣﻦ ﺗﻜﺒ ﻭﺗﺼﻐ ﺍﻟﻌﻨﺼﺮ ﻣﻦ ﺍﻷﻋﻠﻰ ﻭﺍﻷﺳﻔﻞ ﻟﺘﻐﻴ ﺍﻟﻄﻮﻝ
ﻭﻣﻦ ﺍﻟﻴﻤ ﻭﺍﻟﻴﺴﺎﺭ ﻟﺘﻐﻴ ﺍﻟﻌﺮﺽ
ﻭﻣﻦ ﺍﻟﺰﻭﺍﻳﺎ ﻟﺘﻐﻴ ﺍﻟﻄﻮﻝ ﻭﺍﻟﻌﺮﺽ
ﻣﻼﺣﻈﺔ :ﻋﻨﺪ ﺇﻧﺸﺎﺀ ﺃﻱ ﻣﺠﻤﻮﻋﺔ ﺟﺪﻳﺪﺓ ﻷﺩﻭﺍ ﺕ ﺍﻟﺘﺤﻜﻢ ﻳﺘﻢ ﺇﻧﺸﺎﺀ ﺃﺩﺍﺓ ﺍﳴﺆﺷﺮPointer ﻟﻌﻤﻞ ﻣﺠﻤﻮﻋﺔ ﺟﺪﻳﺪﺓ ﻷﺩﻭﺍﺕ ﺍﻟﺘﺤﻜﻢ
-١ﺑﻴﻤ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ Toolboxﺛﻢ Add Tab
-٢ﻳﻈﻬﺮ ﺑﻌﺪ ﺫﻟﻚ ﻣﻜﺎﻥ ﻧﺪﺧﻞ ﺑﻪ ﺇﺳﻢ ﻣﺠﻤﻮﻋﺔ ﺃﺩﻭﺍﺕ ﺍﻟﺘﺤﻜﻢ ﺍﻟﺠﺪﻳﺪﺓ
-٣ﺛﻢ ﻧﺴﺤﺐ ﺍﻷﺩﻭﺍﺕ ﺍﳴﺮﺍﺩ ﻧﻘﻠﻬﺎ ﺇﻟﻴﻬﺎ ﺃﻭ ﻋﻤﻞ ﻧﺴﺦ ﻟﻸﺩﺍﺓ ﻭﻣﻦ ﺛﻢ ﻟﺼﻘﻬﺎ ﳴﺠﻤﻮﻋﺔ ﺃﺩﻭﺍﺕ ﺍﻟﺘﺤﻜﻢ
ﺍﻟﺠﺪﻳﺪﺓ
Label ﺃﺩﺍﺓ ﺍﻟﺘﺴﻤﻴﺔ
٢ -١ﺗﻤﻜﻨﻚ ﻣﻦ ﻛﺘﺎﺑﺔ ﺍﻟﻌﻨﺎﻭﻳﻦ
-٢ﻳﺘﻢ ﻭﺿﻌﻬﺎ ﻋﻠﻰ ﺍﻟﻨﻤﻮﺫﺝ formﻭﺫﻟﻚ ﺇﻣﺎ ﺑﺎﻟﻨﻘﺮ ﻋﻠﻴﻬﺎ ﻧﻘﺮﺗ ﺃﻭ ﺍﻟﻨﻘﺮ ﻭﺍﻟﺴﺤﺐ ﻋﻠﻰ ﺍﻟﻨﻤﻮﺫﺝ ﻟﻌﺮﺽ ﻧﺎﻓﺬﺓ ﺍﻟﺨﺼﺎﺋﺺ ﻷﻱ ﺃﺩﺍﺓ )View – Properties Windows (F4
ﺇﻧﺘﺒﻪ ﻫﺎﻡ
-٣ﻳﻤﻜﻦ ﺗﻐﻴ ﺍﻟﻜﺘﺎﺑﺔ ﺑﻬﺎ ﻋﻦ ﻃﺮﻳﻖ ﺍﻟﺨﺎﺻﻴﺔ text
(
(
mmbadweym@yahoo.com
email
Visual Basic 2010 , ADO.NET, Crystal Report
ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ ٢٠١٠ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ
(
mmbadweym@yahoo.com
email
ﺧﺼﺎﺋﺺ ﺃﺩﺍﺓ ﺍﻟﺘﺴﻤﻴﺔ Label ﺳﻨﺘﻌﻠﻢ ﺃﻏﻠﺐ ﺍﻟﺨﺼﺎﺋﺺ ﺍﻟﺘﻲ ﻧﺤﺘﺎﺟﻬﺎ ﻓﻲ ﺃﻏﻠﺐ ﺍﻟﺒﺮﺍﻣﺞ ١
Name
ﺍﻹﺳﻢ ﺍﳴﺴﺘﺨﺪﻡ ﺩﺍﺧﻞ ﺍﻟﻣﺠﺔ ﺍﻟﺤﺠﻢ ﺍﻟﺘﻠﻘﺎﺋﻲ )ﺃﻱ ﺍﻟﺤﺞ ﺍﻟﺘﻠﻘﺎﺋﻲ ﻃﺒﻘﺎ ﻟﻠﻨﺺ (
٢
False
True
ﺗﻘﻮﻡ ﺑﻀﺒﻄﻪ ﺑﻨﻔﺴﻚ
ﺃﻱ ﺍﻟﺤﺠﻢ ﺗﻠﻘﺎﺋﻲ
٣ ٤
٥
AutoSize
ﻳﻤﻜﻦ ﺇﺧﺘﻴﺎﺭ ﺃﻱ ﻟﻮﻥ ﻟﺨﻠﻔﻴﺔ Label Fixed3D
BackColor
FixedSingle
ﺑﺸﻜﻞ ﺣﺪ ﺛﻼﺛﻲ ﺍﻷﺑﻌﺎﺩ
None
ﺑﺸﻜﻞ ﺣﺪ ﻣﻔﺮﺩ
BordeStyle
ﺑﺪﻭﻥ ﺣﺪ
Enabled
False
True
ﻻ ﻳﻤﻜﻦ ﺍﻟﺘﻌﺎﻣﻞ ﻣﻌﻪ ﺃﺛﻨﺎﺀ ﺗﺸﻐﻴﻞ ﺍﻟﻧﺎﻣﺞ ﻭﻳﻈﻬﺮ ﻓﺎﺗﺢ
ﻣﻤﻜﻦ ﻳﻤﻜﻦ ﺍﻟﺘﻌﺎﻣﻞ ﻣﻌﻪ ﺃﺛﻨﺎﺀ ﺗﺸﻐﻴﻞ ﺍﻟﻧﺎﻣﺞ ﻭﻳﻈﻬﺮ ﻏﺎﻣﻖ
ﻫﻮ ﺍﻟﺬﻱ ﻳﺘﻌﺎﻣﻞ ﻣﻊ ﺍﻟﺨﻂ
٦
ForeColor
Underline
Strikeline
Italic
Bold
Unit
Size
Name
ﻟﻮﻥ ﺍﻟﻨﺺ
ﺗﺴﻄ
ﺧﻂ ﳲ
ﻣﺎﺋﻞ
ﻏﺎﻣﻖ
ﻭﺣﺪﺓ
ﺣﺠﻢ
ﻧﻮﻉ ﺍﻟﺨﻂ
ﻣﻨﺘﺼﻔﻪ
ﺗﺤﺘﻪ ﺧﻂ
ﻋﺮﻳﺾ
ﺍﳴﺴﺘﺨﺪﻡ ﻟﺤﺠﻢ
ﺍﻟﺨﻂ
Font
ﺍﻟﺨﻂ
Image
ﺻﻮﺭﺓ ﻣﻊ ﺍﻟﺨﻠﻔﻴﺔ ImageALIGN
٧
ﻣﺤﺎﺫﺍﺓ ﺍﻟﺼﻮﺭﺓ ﺗﺤﺪﻳﺪ ﻣﻜﺎﻧﻪ ﻋﻠﻰ ﺍﳴﺤﻮﺭ x , y
٨
Locatio
ﻭﻟﻜﻦ ﻫﺬﺍ ﻳﻤﻜﻦ ﺑﺎﻟﺴﺤﺐ ﺑﺄﺩﺍﺓ ﺍﳴﺆﺷﺮ ﻭﺍﻟﺘﺤﺮﻳﻚ
٩
Locked
False
True
ﻳﻤﻜﻦ ﺍﻟﺘﺤﻜﻢ ﺑﻬﺎ ﺃﺛﻨﺎﺀ ﺍﻟﺘﺼﻤﻴﻢ
ﻻﻳﻤﻜﻦ ﺍﻟﺘﺤﻜﻢ ﺑﻬﺎ ﺃﺛﻨﺎﺀ ﺍﻟﺘﺼﻤﻴﻢ ﻭﻳﻈﻬﺮ ﻋﻠﻴﻬﺎ ﺍﻟﻘﻔﻞ
ﺍﻟﺤﺪﻭﺩ ﺃﻱ ﺑﻌﺪ ﺍﻟﻨﺺ ﻋﻦ ﻣﺮﺑﻊ ﺍﻟﺘﺴﻤﻴﺔ
١٠
Margin
Right – Left –Top- Bottom
No
Yes
ﻻ
ﻧﻌﻢ
(
(
RightToLeft
mmbadweym@yahoo.com
email
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
(
mmbadweym@yahoo.com
(
MMBADWEYM@YAHOO.COM
mmbadweym@yahoo.com
(
(
mmbadweym@yahoo.com
(
Visual Basic 2010 , ADO.NET, Crystal Report
ﻭﻗﻮﻋﺪ ﺍﻟﺒﻴﺎﻧﺎﺕ ﻭﻛﺮﻳﺴﺘﺎﻝ ﺭﻳﺒﻮﺭﺕ٢٠١٠ ﻓﻴﺠﻮﺍﻝ ﺑﻴﺴﻴﻚ ﺩﻭﺕ ﻧﺖ
mmbadweym@yahoo.com
(
(