Está en la página 1de 8

Dim ValorA As Decimal

Dim ValorDe As Decimal

ValorDe=CType(TxtValor.text.Decimal)

Select Case De

Case 1

ValorA=ValorDe/

Case 2

ValorA=ValorDe/2.54

Case 3

ValorA=ValorDe/30.48

Case 4

ValorA=ValorDe/91.44

Case 5

ValorA=ValorDe/100

Case 6

ValorA=ValorDe/100000

Case 7

ValorA=ValorDe/161031

End Select

Case 2

Select Case A

Case 1

ValorA=ValorDe*2.54

Case 2

ValorA=ValorDe

Case 3

ValorA=ValorDe*2.54/30.48

Case 4

ValorA=ValorDe*2.54/91.44
Case 5

ValorA=ValorDe*2.54/100

Case 6

ValorA=ValorDe*2.54/100000

Case 7

ValorA=ValorDe*2.54/161031

End Select

Case 3

Select Case A

Case 1

ValorA=ValorDe*30.48

Case 2

ValorA=ValorDe*30.48/2.54

Case 3

ValorA=ValorDe*91.44/30.48

Case 4

ValorA=ValorDe

Case 5

ValorA=ValorDe*91.44/100

Case 6

ValorA=ValorDe*91.44/100000

Case 7

ValorA=ValorDe*91.44/161031

End Select

Case 5

Select Case A

Case 1

ValorA=ValorDe*100

Case 2
ValorA=ValorDe*100/2.54

Case 3

ValorA=ValorDe*100/30.48

Case 4

ValorA=ValorDe*100/91.44

Case 5

ValorA=ValorDe

Case 6

ValorA=ValorDe*100/100000

Case 7

ValorA=ValorDe*100/161031

End Select

Case 6

Select Case A

Case 1

ValorA=ValorDe*100000

Case 2

ValorA=ValorDe*100000/2.54

Case 3

ValorA=ValorDe*100000/30.48

Case 4

ValorA=ValorDe*100000/0.9144

Case 5

ValorA=ValorDe*1000

Case 6

ValorA=ValorDe

Case 7

ValorA=ValorDe/161031

End Select
Case 7

Select Case A

Case 1

ValorA=ValorDe*1.61031*100000

Case 2

ValorA=ValorDe*1.61031*100000/2.54

Case 3

ValorA=ValorDe*1.61031*100000/30.48

Case 4

ValorA=ValorDe*1.61031*1000/91.44

Case 5

ValorA=ValorDe*1.61031*1000

Case 6

ValorA=ValorDe*1.61031

Case 7

ValorA=ValorDe

Dim Im, Mo, Te, Mn, Pr, Dd, H As Integer

Im=0

Mo=0

Te=0

Mn=0

Pr=0

Dd=0

If ChImpresora.Checked=True Then

Im=100

End If

If ChMouse.Checked=True Then

Mo=10
End If

If ChTeclado.Checked=True Then

Te=20

End If

If ChMonitor.Checked=True Then

Mn=110

End If

If ChProcesador.Checked=True Then

Pr=150

If ChDiscoDuro.Checked=True Then

Dd=120

End If

H=Im+Mo+Te+Mn+Pr+Dd

LblPrecio.Text=Str(H)

Dim cadena, resultado As String

Resultado=””

Cadena=txtCadena.Text

If rbOpcion1.Checked=True Then

Resultado=String.Left(cadena, 1)

ElseIf rbOpcion2.Checked=True Then

Resultado=String.Right(cadena, 1)

ElseIf rbOpcion3.Checked=True Then

Resultado=String.Mid(cadena, 4, 2)

ElseIf rbOpcion4.Checked=True Then

Resultado=”La cadena tiene”+Str(Len(cadena, 1))+”caracteres”

ElseIf rbOpcion5.Checked=True Then

Resultado=cadena.ToUpper

ElseIf rbOpcion6.Checked=True Then

Resultado=cadena.ToLower
ElseIf rbOpcion7.Checked=True Then

Dim cadBuscar As String

CadBuscar=InputBox(“Ingrese una letra a buscar”, “Buscar”)

Resultado=”El caracter”+cadBuscar+”se encuentra en la posición: ”+Str(InStr(cadena,cadBuscar))

End If

Dim cadena, resultado As String

Resultado=txtCadena.Text

Resultado=””

For x=1 To Len(cadena)

Resultado=resultado+Mid(cadena, x, 1)+Chr(13)

Next

LblResultado.Text=resultado

Dim cadena, resultado As String

Resultado=txtCadena.Text

Resultado=””

For x=1 To 1 Step -1

Resultado=resultado+Mid(cadena, x, 1)

LblResultado.Text=resultado

ComboBox1.Items.Clear()

For x=1 to 30

ComboBox1.Items.Add(“Elemento”+Str(x))

Next

ListBox1.Items.Clear()

For x=200 to 0 Step -1

ListoBox1.Items.Add(“Elemento”+Str(x))

Next

Sub actualizar()

LblSuma1.Text=(LbLista1.Items.Count())

LblSuma2.Text=(LbLista2.Items.Count())
LblSuma3.Text=(LbLista3.Items.Count())

End Sub

Dim nombre As String

If TxtNombre.Text.Trim=””Then

MessageBox.Show(“Ingrese el nombre”,”por favor”)

TxtNombre.Focus()

Exit Sub

End If

Nombre= TxtNombre.Text.ToUpper()

If RbLista1.Checked then

También podría gustarte