Compte Rendu VB
Compte Rendu VB
Compte Rendu VB
d
Public Class Form1
End Sub
etq.Text = "+"
End Sub
etq.Text = "-"
End Sub
Private Sub Button2_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
etq.Text = "*"
End Sub
etq.Text = "/"
End Sub
End
End Sub
zn1.Clear()
zn2.Clear()
zn3.Clear()
etq.Text = ""
End Sub
zn1.Clear()
zn2.Clear()
zn3.Clear()
etq.Text = ""
End Sub
End Class
Dim op As String
Dim R1 As Integer
zn1.Text = 2
Else
zn2.Text = 2
End If
End Sub
zn1.Text = 0
Else
zn2.Text = 0
End If
End Sub
zn1.Text = 1
Else
zn2.Text = 1
End If
End Sub
zn1.Text = 3
Else
zn2.Text = 3
End If
End Sub
zn1.Text = 4
Else
zn2.Text = 4
End If
End Sub
Private Sub Btn5_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Btn5.Click
zn1.Text = 5
Else
zn2.Text = 5
End If
End Sub
zn1.Text = 6
Else
zn2.Text = 6
End If
End Sub
zn1.Text = 7
Else
zn2.Text = 7
End If
End Sub
Else
zn2.Text = 8
End If
End Sub
zn1.Text = 9
Else
zn2.Text = 9
End If
End Sub
op = "*"
End Sub
op = "-"
End Sub
op = "+"
End Sub
Private Sub div_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles div.Click
op = "/"
End Sub
zn1.Clear()
zn2.Clear()
etq.Text = ""
End Sub
If op = "/" Then
R1 = Val(zn1.Text) / Val(zn2.Text)
etq.Text = R1
End If
If op = "+" Then
R1 = Val(zn1.Text) + Val(zn2.Text)
etq.Text = R1
End If
If op = "-" Then
R1 = Val(zn1.Text) - Val(zn2.Text)
etq.Text = R1
End If
If op = "*" Then
R1 = Val(zn1.Text) * Val(zn2.Text)
etq.Text = R1
End If
End Sub
End Sub
End Class
Public Class Form1
L2.Items.Add(T1.Text)
Else
L1.Items.Add(T1.Text)
End If
L2.Items.Add(T1.Text)
End If
End If
T1.Clear()
T2.Clear()
T1.Focus()
End Sub
End Class
Dim i As Integer = 0
End Sub
If (i < 7) Then
If (Val(ztn.Text) <= 50 And
Val(ztn.Text) >= -50) Then
taptmp(i) = Val(ztn.Text)
Else
MsgBox("saisir un entier dans
intervale [-50,50]")
End If
Else
End If
End sub
End class
Dim T1 (0 to 4) as integer
Dim T2 (0 to 4) as integer
Private sub
Dim I as integer
Randomize()
For ( i=0 to ubound(T1))
T1(i)=Int(Rnd()*60)+1
Etq.text=etq.text&“**“&T1(i)
Nexti
Dim j as integer
T2(j)=Int (Rnd()*60)+1
Etq.text=etq.text&“**“&T2(j)
Nextj
If ( T1(i)=T2(j))then
K=K+1
End if
Next J
Next i
Etq2.text=K
End sub