This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
8. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] VB.Net .. : VB VS.Net .. .. . Enter..: : If
X = 0 Then : End If Then ! If . ..: . .. .. .. Splitter . Run Time
. Compiler VS.Net VB VC++.. Recursive Programming . Exception
Handlers Try.. Catch.. End Try. VB.Net Object Oriented Programming
IntegersStringsArrays Classes .. ...... ! Inheritance Polymorphism
.. Single Inheritance. .Net Framework Classes API .. )( DirectX
APIs . Controls . : StackQueueBitArray ArrayList . 1 - : //.
http://www.montada.com/forumdisplay.php?f=212
9. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] If Statements Loops . Nested Classes Type .
Interfaces . Delegate ! Attributes . .. FileSystemWatcher
Collection Serialization. GDI+.. ..... Pointers System ! Threads
Multithreading. ADO.Net . VB ASP Servers ASP!! .Net) .Net 2002( )
.Net 2003( C# C++ J# .Net Standerd Professional Team Suite Express.
VB.Net 2005 Visual Basic .Net 2008. 1 - : " "
10. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] VB.Net 2005 : . Windows XP Professional
serves Pack 2 Windows XP Home Educat serves Pack 2 Windows server
2003 serves Pack 1 Windows server 2000 serves Pack 4 Windows Data
center server . . . ) *( )*(. com.it4salem.www ........ . E-
MailWeb Site [email protected][email protected][email protected] www.salem4it.com - 1 : " "
29. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] ) Solution(Project )( Project: Forms
ModulesClasses Vb.Net )Solution( Projects Solution Project Solution
Solution Explorer View Ctrl+Alt+L Solution Explorer Add New
Item
30. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] New Item Add New Item VISUAL STDIO.NET
Windows Form Add New Item Add Form Form Solution Explorer
36. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Compile 1- Option Explicit 2 - Option strict
Dim i As Integer Dim s As String s = "10" i = s ' This Fails. s =
"Hello" i = s ' This Fails. Dim i As Integer Dim s As String s =
"10" i = s ' This works. s = "Hello" i = s ' This Fails.
37. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Tools option Project and solution VB
Defaults ok Option compare Binary or Text Binary Resources
42. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Attach To Process Attach Connect to Device
Connect to Pocket PC or Smartphone devices or emulators Connect to
Database Code Snippets Manager Insert Snippet Choose Toolbox Items
ToolBox Macros External Tools Tools Menu Device Emulation Manager
Import/Export Settings IDE Customize Customize Options
43. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] [ Window ] Dockable, Floating, Tabbed
Document Toolbox, Solution Explorer, Auto Hide Hide view Auto Hide
All
44. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] New Horizontal Tab Group New Vertical Tab
Group
45. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Close All Documents Reset Window Layout
Windows
46. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] [Community]1 MSDN Community Center
aspx.497440aa/us-en/com.microsoft.2msdn://http [Help] 1 -/ :Visual
basic.Net 2005 CHM File
47. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] : *: Control Button , Textbox , LabelControl
Component Control : menu OpenFileDialog * :
48. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] : * : * Ctrl Ctrl . : TabControl, GroupBox,
Panel, . . container container container container container .
container . * Run Time : ToolBox Run Time . . . . Run Time . Run
Time : Dim lblHi As New Label lblHi.SetBounds (50, 50, 70,70)
lblHi.Text="Hello World" Me.Controls.Add (lblHi) Label lblHi Label
. lblHi SetBounds . Text LabelHello World . lblHi Add Controls .
Label Button .
49. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] WithEvents : Dim WithEvents btnHi As New
Button btnHi Button Class Name Method Name Dim WithEvents btnHi As
Button Class Name btnHi
57. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] AnchorNone AnchorButton Top, Right Button
Top, Right Button Button Form_Load Button1.Location = New
Point(Me.ClientRectangle.Width -Button1.Width,
Me.ClientRectangle.Height - Button1.Height) Button1.Anchor =
AnchorStyles.Bottom Or AnchorStyles.Right TextBox
58. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Anchor Top None Bottom Dock DockTop Button
Left & Right ToolBar Button Anchor Top, Left, Right DockTop,
Bottom, Left, Right, Fill, or None Fill Dock None stacking order
Z-order . : TextBox MultiLine True Dock : : Right : Top : Bottom :
Fill
73. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Dim x&=5 Dim y$="salem4it - Youssef"
Option Explicit On Dim x=10000000000 Dim y ="salem4it - Youssef"
Option Explicit ToolsOptions Projects and Solutions VB Defaults
Option Explicit On Option Explicit Off Dim x=10000000000 Dim y
="salem4it - Youssef" xlongy String
97. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Array1 : Dim myvalue(5) As Integer : Dim
myvalue(5, 3) As Integer : Public Class Form1 Dim myvalue(5) As
Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load myvalue(0) = 11
myvalue(1) = 4 myvalue(2) = 13 myvalue(3) = 44 myvalue(4) = 123 End
Sub End Class Loop : Public Class Form1 Dim mycounter As Integer
Dim myvalue(5) As Integer Private Sub Form1_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For
mycounter = 0 To myvalue.Length - 1 myvalue(mycounter) = mycounter
Next End Sub End Class integermycounter For myvalue.Length -
1Length . mycounter .. Public Class Form1 Dim myvalue(5, 3) As
Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load myvalue(0, 0) = 1
myvalue(0, 1) = 2 myvalue(0, 2) = 3 myvalue(0, 3) = 4 myvalue(1, 0)
= 5 myvalue(1, 1) = 6 myvalue(1, 2) = 7 myvalue(1, 3) = 8
myvalue(2, 0) = 9 myvalue(2, 1) = 10 myvalue(2, 2) = 11 myvalue(2,
3) = 12 1 -/ : CHM FileArray.
98. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] myvalue(3, 0) = 13 myvalue(3, 1) = 14
myvalue(3, 2) = 15 myvalue(3, 3) = 16 myvalue(4, 0) = 17 myvalue(4,
1) = 18 myvalue(4, 2) = 19 myvalue(4, 3) = 20 myvalue(5, 0) = 21
myvalue(5, 1) = 22 myvalue(5, 2) = 23 myvalue(5, 3) = 24 End Sub
End Class . : Public Class Form1 Dim myvalue(5) As String Private
Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load myvalue(0) = "Visual"
myvalue(1) = "Windows" myvalue(2) = "File" myvalue(3) = "Copy"
myvalue(4) = "Edit" myvalue(5) = "Cut" End Sub End Class . : Dim
myvalue() As String = {"Visual", "Windows", "File", "Copy"} : Dim
myvalue(,) As Integer = {{1, 2}, {3, 4}, {5, 6}} Redim : Public
Class Form1 Dim myvalue(5) As Integer Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load ReDim myvalue(0) myvalue(0) = 1 End Sub End Class
Form_loadRedim . . : Public Class Form1 Dim myvalue1(5) As Integer
Dim myvalue2(5, 5, 6) As Integer Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
99. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] MyBase.Load MsgBox(myvalue1.Rank)
MsgBox(myvalue2.Rank) End Sub End Class : Public Class Form1 Dim
myvalue1(5) As Integer Dim myvalue2(5, 5, 6) As Integer Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load MsgBox(UBound(myvalue1))
MsgBox((myvalue2.GetUpperBound(2))) End Sub End Class -- . ...
Msgbox Textbox: Public Class Form1 Dim myvalue1(5) As Integer Dim
myvalue2(5, 5, 6) As Integer Private Sub Form1_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = myvalue1(3) TextBox2.Text = myvalue2(3, 2, 5) End
Sub End Class Textbox .
116. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] : Dim clearDisplay As Boolean Dim Operand1
As Double, Operand2 As Double Dim [Operator] As String public class
: Private Sub bttn1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bttn0.Click, bttn1.Click, bttn2.Click, _
bttn3.Click, bttn4.Click, bttn5.Click, bttn6.Click, bttn7.Click,
bttn8.Click, bttn9.Click If clearDisplay Then lblDisplay.Text = ""
clearDisplay = False End If lblDisplay.Text = Val(lblDisplay.Text +
sender.text) End Sub : Private Sub bttnPeriod_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
bttnPeriod.Click If lblDisplay.Text.IndexOf(".") > 0 Then Exit
Sub Else lblDisplay.Text = lblDisplay.Text & "." End If
117. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] End Sub : (+) Private Sub
bttnPlus_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bttnPlus.Click Operand1 =
Val(lblDisplay.Text) [Operator] = "+" clearDisplay = True End Sub
(=) : Private Sub bttnEquals_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles bttnEquals.Click Dim result As
Double Operand2 = Val(lblDisplay.Text) Try Select Case [Operator]
Case "+" result = Operand1 + Operand2 Case "-" result = Operand1 -
Operand2 Case "*" result = Operand1 * Operand2 Case "/" If Operand2
"0" Then lblDisplay.Text = result End Select Catch exc As Exception
MsgBox(exc.Message) result = "ERROR" Finally lblDisplay.Text =
result clearDisplay = True End Try End Sub : (-) Private Sub
bttnMinus_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bttnMinus.Click Operand1 =
Val(lblDisplay.Text) [Operator] = "-" clearDisplay = True '
lblDisplay.Text = "" End Sub
118. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] (*) Private Sub bttnMultiply_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
bttnMultiply.Click Operand1 = Val(lblDisplay.Text) [Operator] = "*"
clearDisplay = True End Sub _______________________ (/) Private Sub
bttnDivide_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bttnDivide.Click Operand1 =
Val(lblDisplay.Text) [Operator] = "/" clearDisplay = True End Sub
_______________________ form_ Form_load form_keypress Private Sub
Form_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress If
System.Char.IsDigit(e.KeyChar) Or e.KeyChar = "." Then If
clearDisplay Then lblDisplay.Text = "" clearDisplay = False End If
lblDisplay.Text = lblDisplay.Text + e.KeyChar End If End Sub
_______________________ lblDisplay.Text Private Sub
bttnClear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bttnClear.Click lblDisplay.Text = "" End
Sub
119. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Public Class Form1 Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click If RadioButton1.Checked =
True Then a = 1 Else a = 2 End If Form2.Show() End Sub Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load RadioButton1.Checked = True
Button1.Select() End Sub End Class 1 - / ../ / : - /.
120. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Public Class Form2 Dim hits As Integer = 0
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load Me.Timer1.Enabled = False
Me.Timer2.Enabled = False Me.Butpress.Enabled = False End Sub
Private Sub Butstart_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Butstart.Click Select Case a Case 2
Me.Timer1.Interval = 1000 End Select Me.Timer1.Enabled = True
Me.Timer2.Enabled = True Me.Butpress.Enabled = True
Me.Butstart.Enabled = False End Sub Private Sub
Butpress_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Butpress.Click hits = hits + 1
Me.lblhits.Text = Format(hits, "Number of hits = # ") End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer2.Tick Me.Timer1.Enabled = False
Me.Timer2.Enabled = False Me.Butpress.Enabled = False
Me.Butstart.Enabled = True End Sub Private Sub Timer1_Tick(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
Timer1.Tick Randomize() Me.Butpress.Left = 200 * Rnd()
Me.Butpress.Top = 200 * Rnd() End Sub End Class
121. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Public Class Form1 Dim a As Integer Dim d As
Long Private Sub Radiodays_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Radiodays.CheckedChanged a = 1 End Sub Private Sub
Radiohours_CheckedChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Radiohours.CheckedChanged a = 2 End Sub
Private Sub Radiominutes_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Radiominutes.CheckedChanged a = 3 End Sub Private Sub
Radioseconds_CheckedChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Radioseconds.CheckedChanged a = 4 End
Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Button1.Click Select Case a Case 1 d
= DateDiff(DateInterval.Day, DateTimePicker1.Value, Now)
ListBox1.Items.Add("the difference " & d & " Day") Case 2 d
= DateDiff(DateInterval.Hour, DateTimePicker1.Value, Now.Date)
ListBox1.Items.Add("the difference " & d & " Hour") 1 - /
../ / : - /.
122. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Case 3 d = DateDiff(DateInterval.Minute,
DateTimePicker1.Value, Now.Date) ListBox1.Items.Add("the difference
" & d & " Minute") Case 4 d = DateDiff(DateInterval.Second,
DateTimePicker1.Value, Now.Date) ListBox1.Items.Add("the difference
" & d & " Second") End Select End Sub Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load DateTimePicker1.ShowCheckBox
= True Me.Text = "Date Calculater" Button1.Text = "Calculater"
Radiodays.Checked = True Button1.Select() End Sub 'Programming
Mohamed Ahmed Youssef End Class
123. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Public Class Form1 Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click If RadioButton1.Checked =
True Then a = 1 ElseIf RadioButton2.Checked = True Then a = 2 Else
a = 3 End If Form2.Show() End Sub Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load Button1.Select() RadioButton1.Checked = True End Sub
End Class 1 - / ../ / : - /.
124. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Public Class Form2 Dim n1, n2 As Integer Dim
r1, r2 As Integer Private Sub Form2_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Select() TextBox3.Text = "Plase Enter the Result" Select
Case a Case 1 Randomize() n1 = 1 + 10 * Rnd() n2 = 1 + 10 * Rnd()
TextBox1.Text = "The Result of multiplication " + CStr(n1) + " by "
+ CStr(n2) + " = " TextBox2.Text = "" Case 2 Randomize() n1 = 15 +
10 * Rnd() n2 = 15 + 10 * Rnd() TextBox1.Text = "The Result of
multiplication " + CStr(n1) + " by " + CStr(n2) + " = "
TextBox2.Text = "" Case 3 Randomize() n1 = 100 + 10 * Rnd() n2 =
100 + 10 * Rnd() TextBox1.Text = "The Result of multiplication " +
CStr(n1) + " by " + CStr(n2) + " = " TextBox2.Text = "" End Select
End Sub Private Sub Button2_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button2.Click Button1.Select()
TextBox3.Text = "Plase Enter the Result" Select Case a Case 1
Randomize() n1 = 1 + 10 * Rnd() n2 = 1 + 10 * Rnd() TextBox1.Text =
"The Result of multiplication " + CStr(n1) + " by " + CStr(n2) + "
= " TextBox2.Text = "" Case 2 Randomize() n1 = 10 + 10 * Rnd() n2 =
10 + 10 * Rnd()
125. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] TextBox1.Text = "The Result of
multiplication " + CStr(n1) + " by " + CStr(n2) + " = "
TextBox2.Text = "" Case 3 Randomize() n1 = 100 + 10 * Rnd() n2 =
100 + 10 * Rnd() TextBox1.Text = "The Result of multiplication " +
CStr(n1) + " by " + CStr(n2) + " = " TextBox2.Text = "" End Select
End Sub Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click r1 = n1 * n2 Try
r2 = TextBox2.Text If r1 = r2 Then TextBox3.Text = "congratulation
, True Result" Else TextBox3.Text = "Sorry ,Wronge Result the True
Resulte " + CStr(r1) + " " End If Catch ex As Exception
MsgBox("Enter the answer") Exit Sub End Try End Sub End Class
126. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] "" C:images You have to copy contents of
subdirectory images into C:images Public Class Form1 ' 'w=Wrong
Answer 'r=Right Answer Dim r, w As Integer ' Dim a As String ' Dim
nameflage As String Private Sub Form1_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '
With ComboBox1 .Items.Add(")" .Items.Add(" ") .Items.Add(")"_
.Items.Add(")" 1 - / ../ / : - /.
127. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] .Items.Add(" ") .Items.Add(")"
.Items.Add(")" .Items.Add(")" .Items.Add(")" .Items.Add(")"
.Items.Add(")" .Items.Add(")" .Items.Add(" ") .Items.Add(")"
.Items.Add(")"_ .Items.Add(" ") .Items.Add(" ") .Items.Add(")"
.Items.Add(")" .Items.Add(")" .Items.Add(" ") .Items.Add(")"
.Items.Add(")" .Items.Add(")" .Items.Add(")" .Items.Add(")"
.Items.Add(")" .Items.Add(")"_ .Items.Add(")" .Items.Add(")"
.Items.Add(")" .Items.Add(")" .Text = " " .RightToLeft =
Windows.Forms.RightToLeft.Yes .ForeColor = Color.Red End With '
Strech PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
TextBox1.Text = "Choose the name of country which flag is shown
above." ' Call Flageshow() End Sub Private Sub Button1_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click ' Call Flageshow() ComboBox1.Text = " " TextBox1.Text
= "Choose the name of country which flag is shown above." r = 0
TextBox2.Text = r w = 0 TextBox3.Text = w End Sub Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click ' a = ComboBox1.Text If
PictureBox1.ImageLocation = ("c:images" + a + ".png") Then
TextBox1.Text = "Congratulations.Right result." r = r + 1
TextBox2.Text = r Else TextBox1.Text = "Sorry.Wrong answer.The
right country is " + nameflage + " ." w = w + 1 TextBox3.Text =
w
128. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] End If End Sub Private Sub
Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click ' Call Flageshow()
ComboBox1.Text = " " TextBox1.Text = "Choose the name of country
which flag is shown above." End Sub ' Sub Flageshow() ' Dim n As
Integer ' Randomize() n = Rnd() * 26 Select Case n Case 1
PictureBox1.Load("c:images .png") nameflage = " " Case 2
PictureBox1.Load("c:images.png") nameflage = "" Case 3
PictureBox1.Load("c:images.png") nameflage = "" Case 4
PictureBox1.Load("c:images.png") nameflage = "" Case 5
PictureBox1.Load("c:images.png") nameflage = "" Case 6
PictureBox1.Load("c:images.png") nameflage = "" Case 7
PictureBox1.Load("c:images.png") nameflage = "" Case 8
PictureBox1.Load("c:images .png") nameflage = " " Case 9
PictureBox1.Load("c:images .png") nameflage = " " Case 10
PictureBox1.Load("c:images._png") nameflage = ""_ Case 11
PictureBox1.Load("c:images.png") nameflage = "" Case 12
PictureBox1.Load("c:images.png") nameflage = "" Case 13
PictureBox1.Load("c:images.png") nameflage = "" Case 14
PictureBox1.Load("c:images._png") nameflage = ""_ Case 15
PictureBox1.Load("c:images.png") nameflage = "" Case 16
129. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] PictureBox1.Load("c:images._png") nameflage
= ""_ Case 17 PictureBox1.Load("c:images.png") nameflage = "" Case
18 PictureBox1.Load("c:images.png") nameflage = "" Case 19
PictureBox1.Load("c:images.png") nameflage = "" Case 20
PictureBox1.Load("c:images .png") nameflage = " " Case 21
PictureBox1.Load("c:images.png") nameflage = "" Case 22
PictureBox1.Load("c:images.png") nameflage = "" Case 23
PictureBox1.Load("c:images.png") nameflage = "" Case 24
PictureBox1.Load("c:images.png") nameflage = "" Case 25
PictureBox1.Load("c:images.png") nameflage = "" Case 26
PictureBox1.Load("c:images .png") nameflage = " " Case Else '
PictureBox1.Load("c:imageswrong.png") End Select End Sub
'programming Mohamed Ahmed Youssef End Class
139. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] : New Query : : : ( Select )( From ) :
Emp_info Select From . Execute Select * From Emp_info * . :
140. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] 2 - name - address - country Select Name
,Adderss ,country From Emp_info -DISTINCT Country Country : Select
DISTINCT Country From Emp_info
141. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] -Where : Khalid Name : Select * From
Emp_info Where Name = 'Khalid'' ** Khalid ' Khalid ' Where = <
> =< => Between Like
142. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] -Order By : Adderss : Select * from Emp_info
order by Adderss : -AndOr -: And -: Or . : And Select * From
Emp_info Where Adderss ='muscat' and Country='oman' Or Select *
From Emp_info Where Name ='salim' or Country='egypt'
143. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] SQL ::Count . : Emp_info Select Count(*)
From Emp_info :IN :Select * FromEmp_info whereCountry
IN('oman','uae'( :Between . Select From Where Between And . ) ( ...
ID JobName ContractType selary
155. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] : ( Count - where ... ) Sort Type Filter
.
156. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] ADO.Net 2 Programming ADO.NET .. NET .
ObjectOriented Programming, classes . NET system.datasystem.xml
ADO.NET : connected Disconnected. ADO.NET ADO ActiveX data Object
ADO Classes visualbasic 6 ADO.NET ADO . Data Providers: ADO.NET )
:SQL ServerMS Access ( ClassesADO.NET! ODBC protocol OleDb
protocol. ADO.NET Data Providers ADO.NET ADO.NETAPI : Table 1.
ADO.NET Data Providers are class libraries that allow a common way
to interact with specific data sources or protocols. The library
APIs have prefixes that indicate which provider they support.
Provider Name API Prefix Data Source Description ODBC Data Provider
Odbc Data Sources with an ODBC interface. Normally older data
bases. OleDb Data Provider OleDb Data Sources that expose an OleDb
interface, i.e. Access or Excel. Oracle Data Provider Oracle For
Oracle Data Bases. SQL Data Provider Sql For interacting with
Microsoft SQL Server. Borland Data Provider Bdp Generic access to
many data bases such as Interbase, SQL Server, IBM DB2, and Oracle.
1 -/ : .NetVisual Basic.NetPDF File
206. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] CREATE INDEX: . . )(Unique Index CREATE
UNIQUE INDEX index_name ON table_name (column_name) Simple Index
CREATE INDEX index_name ON table_name (column_name) : CREATE INDEX
PersonIndex ON Person (LastName) : CREATE INDEX PersonIndex ON
Person (LastName DESC) : CREATE INDEX PersonIndex ON Person
(LastName, FirstName) Drop Drop ) ( :- : DROP DATABASE
database_name :- : : DROP TABLE table_name :- : : Syntax for
Microsoft SQLJet (and Microsoft Access): DROP INDEX index_name ON
table_name
207. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Syntax for MS SQL Server: DROP INDEX
table_name.index_name Syntax for IBM DB2 and Oracle: DROP INDEX
index_name Syntax for MySQL: ALTER TABLE table_name DROP INDEX
index_name : TRUNCATE TABLE table_name ALTER TABLE ). ( : ALTER
TABLE table_name ADD column_name datatype : : ALTER TABLE
table_name DROP COLUMN column_name : Person: LastName FirstName
Address Pettersen Kari Storgt 20 : To add a column named "City" in
the "Person" table: ALTER TABLE Person ADD City varchar(30) Result:
LastName FirstName Address City Pettersen Kari Storgt 20 : To drop
the "Address" column in the "Person" table:
208. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] ALTER TABLE Person DROP COLUMN Address
Result: LastName FirstName City Pettersen Kari SELECT INTO : SELECT
column_name(s) INTO newtable [IN externaldatabase] FROM source :
SELECT * INTO Persons_backup FROM Persons :IN SELECT Persons.* INTO
Persons IN 'Backup.mdb' FROM Persons : SELECT LastName,FirstName
INTO Persons_backup FROM Persons :Where SELECT LastName,Firstname
INTO Persons_backup FROM Persons WHERE City='Sandnes' : SELECT
Employees.Name,Orders.Product INTO Empl_Ord_backup FROM Employees
INNER JOIN Orders ON Employees.Employee_ID=Orders.Employee_ID
CREATE VIEW SQL .
209. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] : CREATE VIEW view_name AS SELECT
column_name(s) FROM table_name WHERE condition : - - Northwind: :
CREATE VIEW [Current Product List] AS SELECT ProductID,ProductName
FROM Products WHERE Discontinued=No : SELECT * FROM [Current
Product List] : CREATE VIEW [Products Above Average Price] AS
SELECT ProductName,UnitPrice FROM Products WHERE
UnitPrice>(SELECT AVG(UnitPrice) FROM Products) : SELECT * FROM
[Products Above Average Price] : CREATE VIEW [Category Sales For
1997] AS SELECT DISTINCT CategoryName,Sum(ProductSales) AS
CategorySales FROM [Product Sales for 1997] GROUP BY CategoryName :
SELECT * FROM [Category Sales For 1997] : SELECT * FROM [Category
Sales For 1997] WHERE CategoryName='Beverages'
213. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Condition Conditional Branching Const (
Constant ) Control Box CStr( ) Current X Current Y Customize
)(.....Data Type )( DB Click ( Double Click) Defined Functions
Definition Design Mode ) (Dim (Dimension) ) (Draw Width ) (Edit
Encapsulation ) (End ) (End Sub Enterprise Edition Enum ) (Event
Event Driven Programs Event Driven Event Handler ) (EXE File )
......(Expression False ) (File ) (Fill Color ) (Fill Style Fix ( )
) (Font ) (For..... Next .. ) (Fore Color ) (Form Form Layout
Window Form Window ) (Form1.Top ) (FormBorderStyle )(.....Function
) (GroupBox Hardware ) (Height Help ) (High Level Language )
(Hscrollbar
214. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] ) ( HScrollbar -LargeChange ) ( HScrollbar
-SmallChange ) (Icon ) (If.Then .. Else. Endif ) (PictureBox )
(Image )OOP(Inheritance . InputBox ( ) . Instr ( ) ) (Integer )
(IntelliSense list Interpreter ) (Interval ) (Label Control
Language LCase ( ) ) (Left Len ( ) Limited looping ) (Line ) (Load
Logic - logical Logical Operator ) (Long Long Integer --) (Low
Level Language Macros Main Window ) (MaxButton Multiple Document
Interface Form MDI Menu Bar MessageBox.Show Method . Mid ( ) ) (Min
Button ) (Module ) (Mouse Down ) (Mouse Move ) (Mouse Up MsgBox ( )
) (MultiLine Multimedia Multiple Branching
215. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] ) (Name Name Space New Project New Value
Object Object Behavior Object Name Object Oriented Programming --
Object Oriented Programming OOP Open Project Operator Options )
(Paint ) (Picture Pointer ) (Print Procedure Professional Edition
Project Explorer Window Project Window Properties Window ) (Puse
Button ) (Radio Button Randomize ) (ReadOnly Rem . Replace ( )
Reserved Functions ) (RightToLeft . Rnd ( ) ) (Run Run Mode Save
Form Save Project Scale Height ) (Scale Mode Scale Width Scrollbar
Max Value ( Maximum Value ) Scrollbar Min Value ( Minimum Value )
System Development Life Cycle SDLC Select a control );(Semi Colon
Setup Project ) (Single
216. PPrroogg:: Mohamed Youssef EE__MMaaiill::
[email protected] Single Precision ) (Size Mode Snap Lines
Snippets Software Solution Solution Explorer Source Program Special
Symbols Structured Query Language SQL Stander Stander Edition
Statement Stretch String String Expressions Structured Programming
Sub Symbol Text Box Control ) (TextBox TextBox Text TimeOfDay ( ) )
(Timer Title Bar Toolbar Toolbox ) (Tools True ) (Try .. Catch
UCase ( ) Unconditional Branching User Interface V.ScrollBar Val (
) ) (Value Variable ) (View ) (Visible Visual Basic Visual
Studio.Net ) (Width Working Area