Sei sulla pagina 1di 27

Practica Calificada Herramienta De

Desarrollo
De Software
1. Public Class Form1
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Label1.Text = DateString
End Sub

3. Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Label1.Text = DateString
End Sub
End Class

Private Sub Label1_Click(sender As Object, e As


EventArgs) Handles Label1.Click
End Sub
End Class

4. Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Label1.Text = "Son las " & Hour(TimeString) &
" horas con " & Minute(TimeString) & " minutos y "
& Second(TimeString) & " segundos"
End Sub
Private Sub Label1_Click(sender As Object, e As
EventArgs) Handles Label1.Click
End Sub
End Class

2. Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Label1.Text = TimeString
End Sub
Private Sub Label1_Click(sender As Object, e As
EventArgs) Handles Label1.Click
End Sub
End Class

5. Public Class Form1

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
Label1.Text = "Hoy es: " &
Microsoft.VisualBasic.DateAndTime.Day(Now) & "
del mes " &
MonthName(Month(Now)) & " del ao " &
Year(Now)
End Sub
Private Sub Label1_Click(sender As Object, e As
EventArgs) Handles Label1.Click
End Sub
End Class

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
If IsDate(txtfecha.Text) = True Then
Dim Fecha As Date =
Date.Parse(txtfecha.Text)
lbldias.Text =
Microsoft.VisualBasic.Day(Fecha)
lblmes.Text = Month(Fecha)
lblao.Text = Year(Fecha)
lblns.Text = Weekday(Fecha)
lblnm.Text = MonthName(Month(Fecha))
lblnds.Text =
WeekdayName(Weekday(Fecha))
Else
MsgBox("No es una fecha correcta",
MsgBoxStyle.Critical, "Verifique")
txtfecha.Clear()
txtfecha.Focus()
End If
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

6.Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Label1.Text = "El da de la semana es: " &
WeekdayName(Weekday(Now)) & " y tiene el
nmero " & Weekday(Now)
End Sub
Private Sub Label1_Click(sender As Object, e As
EventArgs) Handles Label1.Click
End Sub
End Class

7. Public Class Form1

8. Public Class Form1

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
Dim A, B As Date
A = Date.Parse("01-05-2006")
B = Date.Parse("03-05-2006")
lbldias.Text = "La diferencia es: " &
DateDiff(DateInterval.Day, A, B) & " Dias"
End Sub
Private Sub lbldias_Click(sender As Object, e As
EventArgs) Handles lbldias.Click
End Sub
End Class

10. Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Dim A, B As Date
A = Date.Parse("16:10")
B = Date.Parse("16:20")
lblminutos.Text = "La diferencia es: " &
DateDiff(DateInterval.Minute, A, B) & "Minutos "
End Sub
Private Sub lblminutos_Click(sender As Object, e
As EventArgs) Handles lblminutos.Click
End Sub
End Class

9. Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
Dim A, B As Date
A = Date.Parse("01-05-2006")
B = Date.Parse("02-05-2006")
LblHoras.Text = "La diferencia es: " &
DateDiff(DateInterval.Hour, A, B) & " Horas"
End Sub
Private Sub lblhoras_Click(sender As Object, e
As EventArgs) Handles lblhoras.Click
End Sub
End Class

11. Public Class Form1


Private Sub btndias_Click(sender As Object, e As
EventArgs) Handles btndias.Click
Dim Fecha1, Fecha2 As Date
Dim Tiempo As Integer

Fecha1 = Date.Parse(txtfecha1.Text)
Fecha2 = Date.Parse(txtfecha2.Text)
Tiempo = DateDiff(DateInterval.Day, Fecha1,
Fecha2)
lbltiempo.Text = "Son " & Tiempo & " Das de
diferencia"
End Sub
Private Sub btnsemanas_Click(sender As Object,
e As EventArgs) Handles btnsemanas.Click
Dim Fecha1, Fecha2 As Date
Dim Tiempo As Integer
Fecha1 = Date.Parse(txtfecha1.Text)
Fecha2 = Date.Parse(txtfecha2.Text)
Tiempo = DateDiff(DateInterval.Weekday,
Fecha1, Fecha2)
lbltiempo.Text = "Son " & Tiempo & "
Semanas de diferencia"
End Sub
Private Sub btnmeses_Click(sender As Object, e
As EventArgs) Handles btnmeses.Click
Dim Fecha1, Fecha2 As Date
Dim Tiempo As Integer
Fecha1 = Date.Parse(txtfecha1.Text)
Fecha2 = Date.Parse(txtfecha2.Text)
Tiempo = DateDiff(DateInterval.Month,
Fecha1, Fecha2)
lbltiempo.Text = "Son " & Tiempo & " Meses
de diferencia"
End Sub
Private Sub btnaos_Click(sender As Object, e
As EventArgs) Handles btnaos.Click
Dim Fecha1, Fecha2 As Date
Dim Tiempo As Integer
Fecha1 = Date.Parse(txtfecha1.Text)
Fecha2 = Date.Parse(txtfecha2.Text)
Tiempo = DateDiff(DateInterval.Year, Fecha1,
Fecha2)
lbltiempo.Text = "Son " & Tiempo & " Aos de
diferencia"
End Sub

12. Public Class Form1

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
Dim A As Date
A = Date.Parse("29/10/2016")
lblminutos.Text = "La nueva fecha es: " &
DateAdd(DateInterval.Day, 3, A)
End Sub
Private Sub lblminutos_Click(sender As Object, e
As EventArgs) Handles lblminutos.Click
End Sub
End Class

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

13. Public Class Form1

Private Sub btndias_Click(sender As Object, e As


EventArgs) Handles btndias.Click
Dim Fecha, NuevaFecha As Date
Dim Tiempo As Integer
Fecha = Date.Parse(txtfecha.Text)
Tiempo = Integer.Parse(txttiempo.Text)
NuevaFecha = DateAdd(DateInterval.Day,
Tiempo, Fecha)
lblnuevafecha.Text = "La nueva fecha es: " &
NuevaFecha
End Sub
Private Sub btnsemanas_Click(sender As Object,
e As EventArgs) Handles btnsemanas.Click
Dim Fecha, NuevaFecha As Date
Dim Tiempo As Integer
Fecha = Date.Parse(txtfecha.Text)
Tiempo = Integer.Parse(txttiempo.Text)
NuevaFecha =
DateAdd(DateInterval.WeekOfYear, Tiempo, Fecha)
lblnuevafecha.Text = "Lanueva fecha es: " &
NuevaFecha
End Sub
Private Sub btnmeses_Click(sender As Object, e
As EventArgs) Handles btnmeses.Click
Dim Fecha, NuevaFecha As Date
Dim Tiempo As Integer
Fecha = Date.Parse(txtfecha.Text)
Tiempo = Integer.Parse(txttiempo.Text)
NuevaFecha = DateAdd(DateInterval.Month,
Tiempo, Fecha)
lblnuevafecha.Text = "La nueva fecha es: " &
NuevaFecha
End Sub
Private Sub btnaos_Click(sender As Object, e
As EventArgs) Handles btnaos.Click
Dim Fecha, NuevaFecha As Date
Dim Tiempo As Integer
Fecha = Date.Parse(txtfecha.Text)
Tiempo = Integer.Parse(txttiempo.Text)
NuevaFecha = DateAdd(DateInterval.Year,
Tiempo, Fecha)
lblnuevafecha.Text = "La nueva fecha es: " &
NuevaFecha
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

14. Public Class Form1


Function NuevaFecha(ByVal Intervalo As Byte)
As String
Dim Nueva As Date
Dim Fecha As Date
Dim Tiempo As Integer
Fecha = Date.Parse(txtfecha.Text)
Tiempo = Integer.Parse(txttiempo.Text)
Select Case Intervalo
Case 1
Nueva = DateAdd(DateInterval.Day,
Tiempo, Fecha)
Case 2
Nueva =
DateAdd(DateInterval.WeekOfYear, Tiempo, Fecha)
Case 3
Nueva = DateAdd(DateInterval.Month,
Tiempo, Fecha)
Case 4
Nueva = DateAdd(DateInterval.Year,
Tiempo, Fecha)
End Select
Return "La nueva fecha es: " & Nueva
End Function
Private Sub btndias_Click(sender As Object, e As
EventArgs) Handles btndias.Click
lblnuevafecha.Text = NuevaFecha(1)
End Sub
Private Sub btnsemanas_Click(sender As Object,
e As EventArgs) Handles btnsemanas.Click
lblnuevafecha.Text = NuevaFecha(2)
End Sub
Private Sub btnmeses_Click(sender As Object, e
As EventArgs) Handles btnmeses.Click
lblnuevafecha.Text = NuevaFecha(3)
End Sub
Private Sub btnaos_Click(sender As Object, e
As EventArgs) Handles btnaos.Click
lblnuevafecha.Text = NuevaFecha(4)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

15. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date

Fecha = Date.Parse("13-07-2006")
lblresultado.Text =
DatePart(DateInterval.Day, Fecha).ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

lblresultado.Text =
DatePart(DateInterval.Hour, Fecha).ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

18. Public Class Form1


16. Public Class Form1
Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("01-02-2006")
lblresultado.Text =
DatePart(DateInterval.DayOfYear, Fecha).ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

17. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("31-8-2006 15:20")

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("31-8-2006 15:20")
lblresultado.Text =
DatePart(DateInterval.Minute, Fecha).ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

19. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("31-08-2006 15:20")

lblresultado.Text =
DatePart(DateInterval.Month, Fecha).ToString
End Sub

lblresultado.Text =
DatePart(DateInterval.Quarter, Fecha).ToString
End Sub

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

End Sub
End Class

End Sub
End Class

20. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("24-07-2006")
lblresultado.Text =
DatePart(DateInterval.Quarter, Fecha).ToString
End Sub

22. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("24-05-2006 20:13:45")
lblresultado.Text =
DatePart(DateInterval.Second, Fecha).ToString
End Sub

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

End Sub
End Class

End Sub
End Class

21. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("12-01-2006")

23. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("24-05-2006 20:13:45")

lblresultado.Text =
DatePart(DateInterval.Second, Fecha).ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

24. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("01-05-2006")
lblresultado.Text =
DatePart(DateInterval.WeekOfYear, Fecha).ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

26. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.Left(Texto, 3)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

25. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Fecha As Date
Fecha = Date.Parse("01-05-2006")
lblresultado.Text =
DatePart(DateInterval.Year, Fecha).ToString

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"

lblresultado.Text =
Microsoft.VisualBasic.Left(Texto, 7)
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

27. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.Right(Texto, 7)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Texto = "Hola Mundo"


lblresultado.Text =
Microsoft.VisualBasic.Right(Texto, 3)
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

28. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.Mid(Texto, 3, 4)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

29. Public Class Form1


Public Class Form2
Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click

Dim Codigo, Ao, Sem, Esp, Cic, Tur, Gru,


Semestre, Especialidad, Ciclo, Turno As String
Codigo = txtcodigo.Text
If Codigo.Length <> 10 Then
MsgBox("El cdigo es incorrecto", 16,
"Debe tener 10 caracteres")
txtcodigo.Clear()
Exit Sub
End If
Ao = Microsoft.VisualBasic.Left(Codigo, 4)
Sem = Codigo.Substring(4, 1)
Esp = Codigo.Substring(5, 2)
Cic = Codigo.Substring(7, 1)
Tur = Codigo.Substring(8, 1)
Gru = Microsoft.VisualBasic.Right(Codigo, 1)

lblespecialidad.Text = Especialidad
lblciclo.Text = Ciclo
lblturno.Text = Turno
lblgrupo.Text = Gru
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Select Case Sem


Case "1"
Semestre = "I"
Case "2"
Semestre = "II"
Case Else
Semestre = "Error"
End Select
Select Case Esp
Case "CI"
Especialidad
Case "CO"
Especialidad
Case "ET"
Especialidad
Case "SE"
Especialidad
Case Else
Especialidad
End Select

= "Computacin"
= "Contabilidad"
= "Enfermera"
= "Secretariado"
= "Error"

Select Case Cic


Case "1"
Ciclo = "Primero"
Case "2"
Ciclo = "Segundo"
Case "3"
Ciclo = "Tercero"
Case "4"
Ciclo = "Cuarto"
Case "5"
Ciclo = "Quinto"
Case "6"
Ciclo = "Sexto"
Case Else
Ciclo = "Error"
End Select
Select Case Tur
Case "M"
Turno = "Maana"
Case "T"
Turno = "Tarde"
Case "N"
Turno = "Noche"
Case Else
Turno = "Error"
End Select
lblao.Text = Ao
lblsemestre.Text = Semestre

30. Public Class Form1

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "hola mundo"
lblresultado.Text =
Microsoft.VisualBasic.UCase(Texto)

End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

End Sub
Private Sub btnmayusculas_Click(sender As
Object, e As EventArgs) Handles
btnmayusculas.Click
Dim Frase As String
Frase = txtfrase.Text
lblresultado.Text = Frase.ToUpper
End Sub
Private Sub btntitulos_Click(sender As Object, e
As EventArgs) Handles btntitulos.Click
Dim Frase As String
Frase = txtfrase.Text
lblresultado.Text = StrConv(Frase,
VbStrConv.ProperCase)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

31. Public Class Form1

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "HOLA MUNDO"
lblresultado.Text =
Microsoft.VisualBasic.LCase(Texto)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

33. Public Class Form1


32. Public Class Form1
Private Sub btnminusculas_Click(sender As
Object, e As EventArgs) Handles
btnminusculas.Click
Dim Frase As String
Frase = txtfrase.Text
lblresultado.Text = Frase.ToLower

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim Texto As String
Texto = " Hola Mundo
"
lblresultado.Text =
Len(Microsoft.VisualBasic.Trim(Texto))
End Sub

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

34. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text = GetChar(Texto, 6)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text = InStr(Texto, "la")
End Sub

Private Sub Form2_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form3


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.InStrRev(Texto, "o", )
End Sub
Private Sub Form3_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

35. Public Class Form1

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.Replace(Texto, "o", "X")
End Sub

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

Private Sub Form3_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

End Sub
End Class

End Sub
End Class

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.Replace(Texto, " ", "_")
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim Texto, N As String
Dim I As Integer
Texto = "Hola Mundo"
N = ""
For I = 1 To Texto.Length
N = N & GetChar(Texto, I) & Space(1)
Next
lblresultado.Text = N.Trim
End Sub
Private Sub Form4_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form3


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.Space(4) & Texto
End Sub

36. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim A, B As Integer
A = 10
B = 25
lblresultado.Text = Str(A).Trim + Str(B).Trim
End Sub

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim A, B As Integer
A = 10
B = 25
lblresultado.Text = A + Str(B).Trim
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

37. Private Sub btnver_Click(sender As Object, e


As EventArgs) Handles btnver.Click
Dim A, B As String
A = "Hola"
B = "Hola"
If StrComp(A, B, CompareMethod.Text) = 0
Then
lblresultado.Text = "Si son iguales"
Else
lblresultado.Text = "No son iguales"
End If

End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text =
Microsoft.VisualBasic.StrReverse(Texto)
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form3


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim Texto As String
Texto = "Hola Mundo"
lblresultado.Text = Texto.Remove(5, 3)
End Sub
Private Sub Form3_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub

End Class

End Class

39. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text =
Microsoft.VisualBasic.Asc("")
End Sub

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
Dim C As Char
C = TextBox1.Text
lblresultado.Text =
Microsoft.VisualBasic.Asc(C)
End Sub

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

End Sub
End Class

End Sub
End Class

38. Public Class Form1

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text =
Microsoft.VisualBasic.Chr("209")
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub

40. Public Class Form1


Private Sub txtnombre_KeyPress(sender As
Object, e As KeyPressEventArgs) Handles
txtnombre.KeyPress
If Asc(e.KeyChar) >= 48 And Asc(e.KeyChar)
<= 57 Then
e.Handled = True
End If
End Sub

Private Sub txtedad_KeyPress(sender As Object,


e As KeyPressEventArgs) Handles
txtedad.KeyPress
If (Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) >
57) And Asc(e.KeyChar) <> 8 Then
e.Handled = True
End If
End Sub

End Class

Private Sub txtsexo_KeyPress(sender As Object,


e As KeyPressEventArgs) Handles txtsexo.KeyPress
If Asc(e.KeyChar) <> 102 And Asc(e.KeyChar)
<> 109 And Asc(e.KeyChar) <> 70 And
Asc(e.KeyChar) <> 77 And Asc(e.KeyChar) <> 8
Then
e.Handled = True
End If
End Sub
Private Sub btnnuevo_Click(sender As Object, e
As EventArgs) Handles btnnuevo.Click
txtnombre.Clear()
txtedad.Clear()
txtsexo.Clear()
txtnombre.Focus()
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = (Microsoft.VisualBasic.Fix(15.6))
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

41. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text =
(Microsoft.VisualBasic.Fix(12.6))
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub

Public Class Form3


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text =
Microsoft.VisualBasic.Hex(10)
End Sub
Private Sub Form3_Load(sender As Object, e As
EventArgs) Handles MyBase.Load

End Sub
End Class

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

Private Sub Form4_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
If Microsoft.VisualBasic.IsNumeric("2089") =
True Then
lblresultado.Text = "Si es un nmero"
Else
lblresultado.Text = "No es un nmero"
End If
End Sub

End Sub
End Class

Private Sub Form2_Load(sender As Object, e As


EventArgs) Handles MyBase.Load

Public Class Form4


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text =
Microsoft.VisualBasic.Int(23.5)
End Sub

End Sub
End Class

43. Public Class Form1

42. Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
If Microsoft.VisualBasic.IsNumeric("20-89") =
True Then
lblresultado.Text = "Si es un nmero"
Else
lblresultado.Text = "No es un nmero"
End If
End Sub

Private Sub btnver_Click(sender As Object, e As


EventArgs) Handles btnver.Click
lblresultado.Text =
Microsoft.VisualBasic.Oct(8)
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
Dim A, B As String
A = "15"
B = "69"
lblresultado.Text =
Microsoft.VisualBasic.Val(A) +
Microsoft.VisualBasic.Val(B)
End Sub

Public Class Form4


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Ceiling(2.1)
End Sub
Private Sub Form4_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Private Sub Form2_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form3


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = System.Math.Abs(-12)
End Sub
Private Sub Form3_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form5


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Floor(2.1)
End Sub
Private Sub Form5_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form6


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Max(15, 20)
End Sub
Private Sub Form6_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form7


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Min(15, 20)
End Sub
Private Sub Form7_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form8


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Pow(2, 3)
End Sub
Private Sub Form8_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form9


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Round(3.2)
End Sub
Private Sub Form9_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form10


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Round(3.6)
End Sub
Private Sub Form10_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Public Class Form12


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Sqrt(25)
End Sub
Private Sub Form12_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

44. Public Class Form1


Public Class Form11
Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Math.Sign(23)
End Sub
Private Sub Form11_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

Private Sub btnraiz_Click(sender As Object, e As


EventArgs) Handles btnraiz.Click
Dim Raiz, Numero As Double
Numero = Double.Parse(txtnumero.Text)
Raiz = Math.Sqrt(Numero)
lblresultado.Text = Raiz
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

End Sub
End Class

45. Public Class Form1


Private Sub Button1_Click(sender As Object, e
As EventArgs) Handles Button1.Click
If txtvalor1.Text = String.Empty Then
MsgBox("Ingrese el primer nmero",
MsgBoxStyle.Critical, "Para mostrar los
resultados")
txtvalor1.Focus()
Exit Sub
End If
If txtvalor2.Text = String.Empty Then
MsgBox("Ingrese el segundo nmero",
MsgBoxStyle.Critical, "Para mostrar los
resultados")
txtvalor2.Focus()
Exit Sub
End If
Dim A, B As Integer
A = Integer.Parse(txtvalor1.Text)
B = Integer.Parse(txtvalor2.Text)
If A = B Then
lblmayor.Text = ""
lblmenor.Text = ""
MsgBox("Los nmeros son iguales",
MsgBoxStyle.Information, "Resultados")
Else
lblmayor.Text = Math.Max(A, B)
lblmenor.Text = Math.Min(A, B)
End If
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load

46. Public Class Form1

Private Sub txtnumero_TextChanged(sender As


Object, e As EventArgs) Handles
txtnumero.TextChanged
If IsNumeric(txtnumero.Text) Then
Dim Numero, Signo As Integer
Numero = Integer.Parse(txtnumero.Text)
Signo = Math.Sign(Numero)
Select Case Signo
Case -1

lblresultado.Text = "El nmero " &


Numero & " es Negativo"
Case 0
lblresultado.Text = "Es un nmero
cero "
Case 1
lblresultado.Text = "El nmero " &
Numero & " es Positivo"
End Select
Else
lblresultado.Text = "No ha ingresado un
nmero"
End If
End Sub

End Class

Private Sub Form1_Load(sender As Object, e As


EventArgs) Handles MyBase.Load
End Sub
End Class

48. Public Class Form1


47. Public Class Form1
Private Sub btnpotencia_Click(sender As Object,
e As EventArgs) Handles btnpotencia.Click
Dim Valor1, Valor2, Potencia As Integer
Valor1 = Integer.Parse(txtvalor1.Text)
Valor2 = Integer.Parse(txtvalor2.Text)
Potencia = Math.Pow(Valor1, Valor2)
lblresultado.Text = Potencia.ToString
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub

Private Sub btnresultado_Click(sender As


Object, e As EventArgs) Handles btnresultado.Click
Dim A, B, C, Mayor1, Mayor2 As Integer
A = Convert.ToInt32(txtvalor1.Text)
B = Convert.ToInt32(txtvalor2.Text)
C = Convert.ToInt32(txtvalor3.Text)
Mayor1 = Math.Max(A, B)
Mayor2 = Math.Max(Mayor1, C)
If A = B And B = C Then
lblresultado.Text = "Los nmeros son
iguales"
Else

lblresultado.Text = "El Nmero mayor es: "


& Mayor2
End If
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

txtvalor2.Clear()
txtvalor2.Focus()
Exit Sub
End If
If Not IsNumeric(txtvalor3.Text) Then
MsgBox("No ha ingresado correctamente el
3er. nmero", MsgBoxStyle.Critical,
"Verifique")
txtvalor3.Clear()
txtvalor3.Focus()
Exit Sub
End If
If Not IsNumeric(txtvalor4.Text) Then
MsgBox("No ha ingresado correctamente el
4to. nmero", MsgBoxStyle.Critical,
"Verifique")
txtvalor4.Clear()
txtvalor4.Focus()
Exit Sub
End If
Dim A, B, C, D, Menor1, Menor2, Menor3 As
Integer
A = Convert.ToInt32(txtvalor1.Text)
B = Convert.ToInt32(txtvalor2.Text)
C = Convert.ToInt32(txtvalor3.Text)
D = Convert.ToInt32(txtvalor4.Text)
Menor1 = Math.Min(A, B)
Menor2 = Math.Min(Menor1, C)
Menor3 = Math.Min(Menor2, D)
If A = B And B = C And C = D Then
lblresultado.Text = "Los nmeros son
iguales"
Else
lblresultado.Text = "El Nmero menor es: "
& Menor3
End If
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

49. Public Class Form1


Private Sub btnresultado_Click(sender As
Object, e As EventArgs) Handles btnresultado.Click
If Not IsNumeric(txtvalor1.Text) Then
MsgBox("No ha ingresado correctamente el
1er. nmero", MsgBoxStyle.Critical,
"Verifique")
txtvalor1.Clear()
txtvalor1.Focus()
Exit Sub
End If
If Not IsNumeric(txtvalor2.Text) Then
MsgBox("No ha ingresado correctamente el
2do. nmero", MsgBoxStyle.Critical,
"Verifique")

Public Class Form2


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text = Int((15 - 20 + 1) * Rnd() +
15)
End Sub
Private Sub Form2_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

50.Public Class Form1


Private Sub btnver_Click(sender As Object, e As
EventArgs) Handles btnver.Click
lblresultado.Text =
Microsoft.VisualBasic.Rnd()
End Sub
Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
End Class

51.Public Class Form1

Dim puntos, jugadas As Integer


Private Sub BtnJugar_Click(sender As Object, e
As EventArgs) Handles BtnJugar.Click
Dim numero As Byte
numero = Int((20 - 10 + 1) * Rnd() + 10)
LblNumero.Text = numero
LblResultado.Text = String.Empty
LblMensaje.Text = String.Empty
BtnMayor.Enabled = True
BtnIgual.Enabled = True
BtnMenor.Enabled = True
BtnJugar.Enabled = False
End Sub
Private Sub
Aplicacion_Desarrollo_12_Load(sender As Object, e
As EventArgs) Handles MyBase.Load
Randomize()
LblNumero.Text = String.Empty
LblResultado.Text = String.Empty
LblMensaje.Text = String.Empty
LblPuntos.Text = "tiene 0 puntos en 0
jugadas"
BtnMayor.Enabled = False
BtnIgual.Enabled = False
BtnMenor.Enabled = False
ToolTip1.SetToolTip(BtnJugar, "Muestra el
numero a jugar")
ToolTip1.SetToolTip(BtnMenor, "Apuesta por
un numero menor al jugado")
ToolTip1.SetToolTip(BtnIgual, "Apuesta por un
numero igual al jugado")

52. Public Class Form1


Private Sub Form1_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
End Sub
Sub limpia()
Lblv1.Text
Lblv2.Text
Lblv3.Text
Lblv4.Text
End Sub

=
=
=
=

String.Empty
String.Empty
String.Empty
String.Empty

Private Sub btnjugar_Click(sender As Object, e


As EventArgs) Handles btnjugar.Click
Static jugadas As Byte
Dim a, b, numero As Integer
jugadas += 1
numero = Int((95 - 5 + 1) * Rnd() + 5)
Select Case jugadas
Case 1
lblv1.Text = numero.ToString
lblv2.Text = String.Empty
lblv3.Text = String.Empty
lblv4.Text = String.Empty