Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Dock = DockStyle.Top
Button2.Dock = DockStyle.Bottom
Button3.SendToBack()
Button3.Dock = DockStyle.Bottom
ListView.BringToFront()
ListView.Dock = DockStyle.Fill
ListView.Clear()
ListView.LargeImageList = ImageList
ListView.Items.Add("老婆", "老婆", 5)
ListView.Items.Add("小蜜", "小蜜", 1)
ListView.Items.Add("丽丽", "丽丽", 4)
ListView.Items.Add("周公", "周公", 7)
ListView.Items.Add("情人", "情人", 7)
ListView.Items.Add("花花", "花花", 8)
ListView.Items.Add("贝贝", "贝贝", 9)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Dock = DockStyle.Top
Button2.Dock = DockStyle.Bottom
Button1.SendToBack()
Button3.Dock = DockStyle.Bottom
ListView.BringToFront()
ListView.Dock = DockStyle.Fill
ListView.Clear()
ListView.LargeImageList = ImageList
ListView.Items.Add("老婆", "老婆", 5)
ListView.Items.Add("小蜜", "小蜜", 1)
ListView.Items.Add("丽丽", "丽丽", 4)
ListView.Items.Add("周公", "周公", 7)
ListView.Items.Add("情人", "情人", 7)
ListView.Items.Add("花花", "花花", 8)
ListView.Items.Add("贝贝", "贝贝", 9)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Button1.Dock = DockStyle.Top
Button2.Dock = DockStyle.Top
Button1.SendToBack()
Button2.SendToBack()
Button3.SendToBack()
Button3.Dock = DockStyle.Top
ListView.BringToFront()
ListView.Dock = DockStyle.Fill
ListView.Clear()
ListView.LargeImageList = ImageList
ListView.Items.Add("老婆", "老婆", 5)
ListView.Items.Add("小蜜", "小蜜", 1)
ListView.Items.Add("丽丽", "丽丽", 4)
ListView.Items.Add("周公", "周公", 7)
ListView.Items.Add("情人", "情人", 7)
ListView.Items.Add("花花", "花花", 8)
ListView.Items.Add("贝贝", "贝贝", 9)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Button1.Dock = DockStyle.Top
Button2.Dock = DockStyle.Top
Button1.SendToBack()
Button2.SendToBack()
Button3.Dock = DockStyle.Bottom
ListView.BringToFront()
ListView.Dock = DockStyle.Fill
ListView.Clear()
ListView.LargeImageList = ImageList
ListView.Items.Add("老婆", "老婆", 5)
ListView.Items.Add("小蜜", "小蜜", 1)
ListView.Items.Add("丽丽", "丽丽", 4)
ListView.Items.Add("周公", "周公", 7)
ListView.Items.Add("情人", "情人", 7)
ListView.Items.Add("花花", "花花", 8)
ListView.Items.Add("贝贝", "贝贝", 9)
End Sub
End Class
Button1.SendToBack()
http://msdn.microsoft.com/zh-cn/library/microsoft.office.tools.excel.controls.button.sendtoback.aspx
ListView.BringToFront()
设有
.SendToBack()就是Button2跑了上面去了。