- Back to Home »
- Tugas 5 - MDI FORM
Posted by : Yusuf Suprianto
Minggu, 09 Desember 2012
Desainlah Form sebagai berikut :
Buatlah 3 sub menu di form utama yaitu Cascade,tile
Horizontal,Tile Vetical :
Kemudia buat
2 form tambahan :
Untuk form 2
:
Dengan
coding :
PublicClassForm2
PrivateSub
Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
HandlesMyBase.Load
Me.MdiParent
= Form1
EndSub
EndClass
Untuk form 3
:
Dengan
Coding :
PublicClassForm3
PrivateSub
Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
HandlesMyBase.Load
Me.MdiParent
= Form1
EndSub
EndClass
Berikut
Coding Keseluruhan pada Form 1 :
PublicClassForm1
PrivateSub
Tugas1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Tugas1ToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.TileHorizontal)
Form2.Show()
Form3.Show()
EndSub
PrivateSub
Latihan1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Latihan1ToolStripMenuItem.Click
Form2.MdiParent
= Me
Form2.Show()
EndSub
PrivateSub
Latihan2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Latihan2ToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
EndSub
PrivateSub
CascadeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CascadeToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.Cascade)
Form2.Show()
Form3.Show()
EndSub
PrivateSub
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()
EndSub
PrivateSub
TileVerticalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TileVerticalToolStripMenuItem.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
EndSub
PrivateSub
ToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripMenuItem2.Click
Form2.MdiParent
= Me
Form2.Show()
EndSub
PrivateSub
ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton1.Click
Me.LayoutMdi(MdiLayout.TileVertical)
Form2.Show()
Form3.Show()
EndSub
PrivateSub
ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
EndSub
PrivateSub
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()
EndSub
EndClass
Berikut
Program Ketika Di Run :
Cassade:
Tile
Horizontal:
Tile
Vertical :
Untuk Menu
Ribbon ditambahkan dengan aplikasi penambah tool (DotNetBar)