Public Class frmInicio
    Dim ArrastrarVentana As Boolean = False
    Dim mousex As Integer
    Dim mousey As Integer
    Dim FormularioActivo As Form

    Sub InicializarDisenioDeControles()
        'Me.FormBorderStyle = FormBorderStyle.None
        'Me.pnlCuerpo.Dock = DockStyle.Fill
    End Sub


    Sub FormularioHijo(frmHijo As Form)
        'If Me.pnlCuerpo.Controls.Count > 0 Then
        '    Me.pnlCuerpo.Controls.RemoveAt(0)
        'End If
        'frmHijo.TopLevel = False
        ''frmHijo.FormBorderStyle = FormBorderStyle.None
        'frmHijo.Dock = DockStyle.Fill
        'Me.pnlCuerpo.Controls.Add(frmHijo)
        'Me.pnlCuerpo.Tag = frmHijo
        'frmHijo.FormBorderStyle = FormBorderStyle.None
        'frmHijo.BackColor = System.Drawing.Color.WhiteSmoke
        'frmHijo.Show()
        frmHijo.MdiParent = Me
        frmHijo.Show()
    End Sub

    Private Sub btnPropuestaDeInversion_Click(sender As Object, e As EventArgs) Handles btnPropuestaDeInversion.Click
        'Me.FormularioActivo = frmPIN
        'Aplicacion.FormularioHijo(FormularioActivo)
        frmPIN_Temporal.MdiParent = Me
        'frmPIN.WindowState = FormWindowState.Normal
        frmPIN_Temporal.Show()
    End Sub


    Private Sub btnMinimizar_Click(sender As Object, e As EventArgs)
        Me.WindowState = FormWindowState.Minimized
    End Sub


    Private Sub btnCerrar_Click(sender As Object, e As EventArgs)
        Me.Close()
    End Sub

    Private Sub frmInicio_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        InicializarDisenioDeControles()
        'FormularioHijo(frmDashboards)
        'frmDashboards_tmp.MdiParent = Me
        'frmDashboards.WindowState = FormWindowState.Maximized
        'frmDashboards.FormBorderStyle = FormBorderStyle.FixedToolWindow
        'frmDashboards_tmp.Show()

    End Sub

    Private Sub pnlEncabezado_MouseDown(sender As Object, e As MouseEventArgs)
        ArrastrarVentana = True
        mousex = Cursor.Position.X - Me.Left
        mousey = Cursor.Position.Y - Me.Top
    End Sub

    Private Sub pnlEncabezado_MouseMove(sender As Object, e As MouseEventArgs)
        If ArrastrarVentana Then
            Me.Top = Cursor.Position.Y - mousey
            Me.Left = Cursor.Position.X - mousex
        End If
    End Sub
    Private Sub pnlEncabezado_MouseUp(sender As Object, e As MouseEventArgs)
        ArrastrarVentana = False
    End Sub

    Private Sub pnlEncabezado_DoubleClick(sender As Object, e As EventArgs)
        'Me.WindowState = FormWindowState.Normal
    End Sub



    Private Sub btnInicio_Click(sender As Object, e As EventArgs)
        'FormularioHijo(frmDashboards_tmp)
    End Sub

    Private Sub btnInverntario_Click(sender As Object, e As EventArgs) Handles btnInverntario.Click
        'FormularioHijo(frmInversiones_Buscar)
        'Me.FormularioActivo = frmINV
        'Aplicacion.FormularioHijo(FormularioActivo)
    End Sub

    Private Sub btnDisponibilidades_Click(sender As Object, e As EventArgs) Handles btnDisponibilidades.Click
        'FormularioHijo(frmDisponibilidades)
    End Sub

    Private Sub PictureBox3_Click(sender As Object, e As EventArgs)

        FormularioHijo(Me.FormularioActivo)
        frmPropuestasDeInversion.Modo = "B"
    End Sub

    Private Sub btnInteractiveBrokers_Click(sender As Object, e As EventArgs) Handles btnInteractiveBrokers.Click
        FormularioHijo(frmInteractiveBrokers)
    End Sub

    Private Sub btnInicio_Click_1(sender As Object, e As EventArgs) Handles btnInicio.Click
        'FormularioHijo(frmDashboards)
    End Sub

    Private Sub pnlCuerpo_Paint(sender As Object, e As PaintEventArgs)

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs)
        frmBuscarDeLista.Show()


    End Sub

    Private Sub StatusStrip1_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles StatusStrip1.ItemClicked

    End Sub
End Class