lunes, 23 de junio de 2014

programa que permite ver imagenes cada 20 segundos hecho por monica gabriela segundo gonzalez

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = TimeOfDay
        Label2.Text = TimeOfDay.Second
    End Sub

    Private Sub Label2_textchanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label2.TextChanged
        Dim cambiar As VariantType
        cambiar = Label2.Text
        Select Case cambiar
            Case 0 To 20
                PictureBox1.BackgroundImage = My.Resources.uno
            Case 21 To 40
                PictureBox1.BackgroundImage = My.Resources.dos
            Case 41 To 59
                PictureBox1.BackgroundImage = My.Resources.tres
        End Select

    End Sub

End Class



numero impar e par hecho por monica gabriela segundo gonzalez

Public Class Form1

   
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim a As Integer
        a = Val(TextBox1.Text) Mod 2
        If TextBox1.Text <> "" Then
            If a <> 0 Then
                Label1.Text = "Es numero impar"
            Else
                Label1.Text = "Es numero par"
            End If
        Else
            MsgBox("No a introducido datos,favor de intentar de nuevo", vbYes + vbCritical, "error")
        End If
    End Sub
    Private Sub textbox1_textchanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        Button1.Enabled = True
    End Sub

End Class