Manual visual studio 2008

Solo disponible en BuenasTareas
  • Páginas : 17 (4117 palabras )
  • Descarga(s) : 0
  • Publicado : 21 de enero de 2011
Leer documento completo
Vista previa del texto
UNIVERSIDAD NACIONAL DE CAJAMARCA

10
MANUAL DE VISUAL BASIC 2008
EJERCICIOS PRACTICOS
MERY GEORGINA CANCHO HUAMAN

PublicClass Form2

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n1, n2, n3, n4, n5, m AsDouble
n1 = TextBox1.Text
n2 = TextBox2.Text
n3 = TextBox3.Text
n4 = TextBox4.Textn5 = TextBox5.Text
m = TextBox1.Text
If n3 > n4 Then
If n3 > n5 Then
If n3 > n1 Then
If n3 > n2 Then
m = n3
Else
m = n2
EndIf
Else
If n1 > n2 Then
m = n1
Else
m = n2
EndIf
EndIf
Else
If n5 > n1 Then
If n5 > n2 Then
m =n5
Else
m = n2
EndIf
Else
If n1 > n2 Then
m = n1
Else
m = n2
EndIf
EndIf
If n1 > n2 Then
EndIf
EndIf
Else
If n4 > n5 Then
If n4 > n1 Then
If n4 > n2 Then
m = n4
Else
m = n2
EndIf
Else
If n1 > n2 Then
m = n1
Elsem = n2
EndIf
EndIf
Else
If n5 > n1 Then
If n5 > n2 Then
m = n5
Else
m = n2
EndIf
Else
If n1 > n2 Then
m = n1
Else
m = n2
EndIf
EndIf
EndIf
EndIf

EndSub
EndClass

PublicClass Form1

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button1.Click
Dim vsue, vdes AsDouble
vdes = 0
vsue = TextBox1.Text

If CheckBox1.Checked Then
vdes = vdes + vsue * 0.1
EndIf
If CheckBox2.Checked Then
vdes = vdes + 25
EndIf
If CheckBox3.Checked Then
vdes = vdes + vsue * 0.2
EndIf
TextBox2.Text = vdes
TextBox3.Text = vsue - vdesEndSub
EndClass

PublicClass Form3

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim monto, c AsDouble
monto = 0
c = 0
If CheckBox1.Checked Then
monto = monto + 220
c = c + 1
EndIf
If CheckBox2.Checked Then
monto = monto + 180
c = c + 1
EndIf
IfCheckBox3.Checked Then
monto = monto + 245
c = c + 1
EndIf
If CheckBox4.Checked Then
monto = monto + 195
c = c + 1
EndIf
TextBox1.Text = c
TextBox2.Text = monto
EndSub
EndClass

PublicClass Form4
Dim desc AsDouble

PrivateSub RadioButton1_Click1(ByVal sender AsObject, ByVal e As System.EventArgs) Handles RadioButton1.Clickdesc = TextBox1.Text * 0.05
TextBox2.Text = desc
TextBox3.Text = TextBox1.Text - desc
EndSub

PrivateSub RadioButton2_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles RadioButton2.Click
desc = TextBox1.Text * 0.09
TextBox2.Text = desc
TextBox3.Text = TextBox1.Text - desc
EndSub

PrivateSub RadioButton3_Click(ByVal senderAsObject, ByVal e As System.EventArgs) Handles RadioButton3.Click
desc = TextBox1.Text * 0.18
TextBox2.Text = desc
TextBox3.Text = TextBox1.Text - desc
EndSub

PrivateSub RadioButton4_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles RadioButton4.Click
desc = TextBox1.Text * 0.25
TextBox2.Text = desc
TextBox3.Text = TextBox1.Text -desc
EndSub
EndClass

PublicClass Form1
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n1, n2, n3, n4, m AsDouble
n1 = TextBox1.Text
n2 = TextBox2.Text
n3 = TextBox3.Text
n4 = TextBox4.Text

If n1 < n2 Then
If n1 < n3 Then
If n1 < n4 Then
m = n1
Else...
tracking img