petersaysdenim

petersaysdenim

Minggu, 09 Desember 2012

MDI Form pada Visual Basic Studio 2010

Aplikasi Sederhana mengenai MDI Form pada Visual Studio 2010

Public Class Form1
    Private Sub ToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem2.Click
        Form2.MdiParent = Me
        Form2.Show()
    End Sub
    Private Sub ToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem3.Click
        Form3.MdiParent = Me
        Form3.Show()
    End Sub
    Private Sub ToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem4.Click
        Form4.MdiParent = Me
        Form4.Show()
    End Sub
    Private Sub ToolStripMenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem5.Click
        Form5.Show()
    End Sub
    Private Sub KeluarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem.Click
        Close()
    End Sub
    Private Sub CascadeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CascadeToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub
    Private Sub HorisontalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HorisontalToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub
    Private Sub VertikalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VertikalToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub
End Class
Jika di Run akan menjadiseperti berikut
tampilan cascade seperti berikut
 
tampilan horizontal seperti berikut
  tampilan vertikal seperti berikut

 Membuat Menu Dengan Library Tambahan (Menu Ribbon)
 Untuk Library tambahan (Ribbon)  menggunakan aplikasi tambahan yaitu DotNetBar.

Tidak ada komentar:

Posting Komentar