防QQ的伸缩菜单。抄袭本园同志的。对不起啊。我仅是记录一下。

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()

http://msdn.microsoft.com/zh-cn/library/microsoft.office.tools.excel.controls.listview.bringtofront.aspx

未命名

设有

.SendToBack()就是Button2跑了上面去了。

的

你可能感兴趣的:(qq)