jueves, 3 de mayo de 2012

RETO5 – Principal



Public Class Principal
    Dim formfuente As New Formulario_Fuente
    Dim eje As New Ejecutables
    Dim fnumericas As New FuncionesNumericas
    Dim fcadena As New FuncionesCadena
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        tsslhora.Text = Date.Now().ToLongTimeString
    End Sub
    Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim x As Long
        For x = ProgressBar1.Minimum To ProgressBar1.Maximum
            ProgressBar1.Value = x
        Next x
    End Sub
    Private Sub tsbffuente_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbffuente.Click
        If formfuente.IsDisposed Then
            formfuente = New Formulario_Fuente
            formfuente.MdiParent = Me
            formfuente.Show()
        Else : formfuente.MdiParent = Me
            formfuente.Show()
        End If
    End Sub
    Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rsbfnumericas.Click
        If fnumericas.IsDisposed Then
            fnumericas = New FuncionesNumericas
            fnumericas.MdiParent = Me
            fnumericas.Show()
        Else : fnumericas.MdiParent = Me
            fnumericas.Show()
        End If
    End Sub
    Private Sub tsbfcadenas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbfcadenas.Click
        If fcadena.IsDisposed Then
            fcadena = New FuncionesCadena
            fcadena.MdiParent = Me
            fcadena.Show()
        Else : fcadena.MdiParent = Me
            fcadena.Show()
        End If
    End Sub
    Private Sub tsbexe_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbexe.Click
        If eje.IsDisposed Then
            eje = New Ejecutables
            eje.MdiParent = Me
            eje.Show()
        Else : eje.MdiParent = Me
            eje.Show()
        End If
    End Sub
    Private Sub VerToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu2expandir.Click
        Me.WindowState = FormWindowState.Maximized
    End Sub

    Private Sub mnu2pequeño_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu2pequeño.Click
        Me.WindowState = FormWindowState.Normal
        Me.Size = New System.Drawing.Size(550, 200)
    End Sub

    Private Sub mnu2mediano_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu2mediano.Click
        Me.WindowState = FormWindowState.Normal
        Me.Size = New System.Drawing.Size(550, 500)
    End Sub

    Private Sub mnu2grande_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu2grande.Click
        Me.WindowState = FormWindowState.Normal
        Me.Size = New System.Drawing.Size(900, 800)
    End Sub

    Private Sub mnu1salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu1salir.Click
        Application.Exit()
    End Sub
End Class

No hay comentarios:

Publicar un comentario