MDI FORM Pada Visual Studio 2010
Aplikasi Sederhana mengenai MDI Form pada Visual Studio 2010 (Menu, Tool, MDI Form)
3.
Lengkapi Desain Form 1 seperti
dibawah ini
Buatlah 3 form( form 1, form2, form3)
4.
Gunakan MenuStrip untuk
mendesain File, Latihan, Tugas, dll
5.
Ubah Properti IsMDIContainer pada form
1 menjadi true
6.
Tambahkan Standar bar
dengan menggunakan ToolStrip
Gunakan Dock pada propertis Untuk memindahkan tempat
standar bar dikiri, kanan, atas atau tengah.
*Untuk menggabungkan antara form1 dan form yang lain maka
setiap form kasih coding seperti dibawah ini:
*Untuk Membuat Ribbon Menggunakan Aplikasi DotNetBar .. Anu download :)
1. Instal terlebih dahulu applikasi tersebut
2. Masuk ke Microsof Visual Studio 2010
3. Buat Form seperti biasa.
4. Lalu ke tool DotNetBar
5. Untuk Penggunaan DotNetBar bisa dilihat disini http://www.devcomponents.com/dotnetbar/movies.aspx#
2. Masuk ke Microsof Visual Studio 2010
3. Buat Form seperti biasa.
4. Lalu ke tool DotNetBar
5. Untuk Penggunaan DotNetBar bisa dilihat disini http://www.devcomponents.com/dotnetbar/movies.aspx#
Untuk Form 2
Codingnya
Public Class Form2
Private Sub
Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.MdiParent = Form1
End Sub
End Class
Dan form 3
Codinya:
Public Class Form3
Private Sub
Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.MdiParent = Form1
End Sub
End Class
* Setelah di Run pada windows kita pilih cascade hasilnya
seperti ini:*
Tampilan Untuk ContexMenuStrip:
Tampilan Cascade
Tampilan Cacade
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
Dan horisontal seperti dibawah ini:
Tampilan TileHorisontal
Me.LayoutMdi(MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
Dan yang terakhir vertikal:
Tampilan TileVertical
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
:::: Mohon sarannya untuk melengkapi aplikasi mengenai MDI Form ini ::::
Coding Keseluruhan::
Public Class Form1
Private Sub Tugas1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tugas1ToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub Latihan1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Latihan1ToolStripMenuItem.Click
Form2.MdiParent = Me
Form2.Show()
End Sub
Private Sub Latihan2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Latihan2ToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub CascadeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CascadeToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileHorizontalToolStripMenuItem.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileVerticalToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
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 ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form2.Show()
End Sub
Private Sub ButtonItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form2.Show()
End Sub
Private Sub ButtonItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Close()
End Sub
Private Sub ButtonItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem15.Click
Form2.Show()
End Sub
Private Sub ButtonItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem17.Click
Form3.Show()
End Sub
Private Sub ButtonItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem24.Click
Form2.Show()
End Sub
Private Sub ButtonItem29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem29.Click
Me.Close()
End Sub
Private Sub ButtonItem30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem30.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem31.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem32.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem13.Click
Me.Close()
End Sub
Private Sub ButtonItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem8.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem11.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem9.Click
Form3.Show()
End Sub
Private Sub ButtonItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem10.Click
Form2.Show()
End Sub
Private Sub ButtonItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem5.Click
Form2.Show()
End Sub
Private Sub ButtonItem33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem33.Click
Form3.Show()
End Sub
Private Sub ButtonItem34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem34.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem14_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem14.Click
Form2.Show()
End Sub
Private Sub ButtonItem35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem35.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
End Class
Private Sub Tugas1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tugas1ToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub Latihan1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Latihan1ToolStripMenuItem.Click
Form2.MdiParent = Me
Form2.Show()
End Sub
Private Sub Latihan2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Latihan2ToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub CascadeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CascadeToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileHorizontalToolStripMenuItem.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileVerticalToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
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 ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form2.Show()
End Sub
Private Sub ButtonItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form2.Show()
End Sub
Private Sub ButtonItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Close()
End Sub
Private Sub ButtonItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem15.Click
Form2.Show()
End Sub
Private Sub ButtonItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem17.Click
Form3.Show()
End Sub
Private Sub ButtonItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem24.Click
Form2.Show()
End Sub
Private Sub ButtonItem29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem29.Click
Me.Close()
End Sub
Private Sub ButtonItem30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem30.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem31.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem32.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem13.Click
Me.Close()
End Sub
Private Sub ButtonItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem8.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem11.Click
Me.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem9.Click
Form3.Show()
End Sub
Private Sub ButtonItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem10.Click
Form2.Show()
End Sub
Private Sub ButtonItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem5.Click
Form2.Show()
End Sub
Private Sub ButtonItem33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem33.Click
Form3.Show()
End Sub
Private Sub ButtonItem34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem34.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
End Sub
Private Sub ButtonItem14_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem14.Click
Form2.Show()
End Sub
Private Sub ButtonItem35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem35.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
End Sub
End Class
Comments
Post a Comment