我想实现的功能是:
1 整个界面分三栏:左边是栏,右上一栏,右下一栏(就好像win2000搜索窗口那样)
2 各栏可以好像win2000搜索窗口那样拉动、滚动.
3 不用任何第三方控件.
4.界面整洁美观谢谢!([email protected])

解决方案 »

  1.   

        也可以摆上3个容器,如picturebox控件就行了。
      

  2.   

    新建工程==>应用程序向导==>资源管理器样式.......
      

  3.   

    给你一个例子吧!!Option ExplicitPrivate Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function ReleaseCapture Lib "user32" () As Long'加三个PICTUREBOX控件,将其中一个作为分隔条,改名为:picSplit
    Private Sub Form_Load()
        Picture1.Left = 60
        Picture1.Top = 60
        Picture2.Top = 60
        picSplit.Left = Picture1.Left + Picture1.Width + 30
        picSplit.Width = 60
        picSplit.BorderStyle = 0
        Picture2.Left = picSplit.Left + picSplit.Width '+ 50
        Picture1.Height = 5700
        Picture2.Height = 5700
        picSplit.Top = 60
        picSplit.Height = 5700
        picSplit.MousePointer = vbSizeWE
    End SubPrivate Sub picSplit_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            SetCapture picSplit.hwnd
            picSplit.Tag = x
            picSplit.BackColor = &HFF8080
        End If
    End SubPrivate Sub picSplit_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            If picSplit.Left >= (100 - x) And picSplit.Left <= (Me.ScaleWidth - 100 - x) Then picSplit.Left = picSplit.Left + x - CInt(picSplit.Tag)
        End If
    End SubPrivate Sub picSplit_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            Picture1.Width = picSplit.Left - 80
            Picture2.Left = picSplit.Left + 50
            Picture2.Width = Width - picSplit.Left - 250
            
            picSplit.BackColor = &H8000000F
            ReleaseCapture
        End If
    End Sub
      

  4.   

    再加一个横向的PICTUREBOX做为分隔条就行了,我现在手边没有VB,你自己调吧!!
      

  5.   

    Option ExplicitPrivate Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function ReleaseCapture Lib "user32" () As Long
    Private Sub Form_Resize()
     picSplitv.Width = 60
        picSplitv.BorderStyle = 0
        picSplith.Height = 60
        picSplith.BorderStyle = 0
        
        Picture1.Left = 60
        Picture1.Top = 60
        Picture3.Top = 60
        Picture2.Top = Picture3.Top + picSplith.Height + Picture3.Height
        Picture2.Width = Me.ScaleWidth
        picSplitv.Left = Picture1.Left + Picture1.Width
         picSplith.Top = Picture3.Top + Picture3.Height
        Picture2.Left = picSplitv.Left + picSplitv.Width
        Picture3.Left = Picture2.Left
        
     
        
        
        Picture1.Height = Me.ScaleHeight
        Picture2.Height = Picture1.Height - Picture3.Height
        Picture3.Width = Me.ScaleWidth
        picSplitv.Top = 60
        picSplitv.Height = Picture1.Height
        picSplitv.MousePointer = vbSizeWE
        
         picSplith.Left = Picture3.Left
        picSplith.Width = Picture3.Width
        picSplith.MousePointer = vbSizeNS
        
        
    End SubPrivate Sub picSplith_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            SetCapture picSplith.hwnd
            picSplith.Tag = Y
            picSplith.BackColor = &H808080
            picSplith.ZOrder 0
        End If
    End SubPrivate Sub picSplith_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            If picSplith.Top >= (100 - Y) And picSplith.Top <= (Me.ScaleHeight - 100 - Y) _
            Then picSplith.Top = picSplith.Top + Y - CInt(picSplith.Tag)
        End If
    End SubPrivate Sub picSplith_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            Picture3.Height = picSplith.Top - 80
            Picture2.Top = picSplith.Top + 50
            Picture2.Height = Height - picSplith.Top - 250
            
            picSplith.BackColor = &H8000000F
            ReleaseCapture
        End If
    End SubPrivate Sub picSplitv_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            SetCapture picSplitv.hwnd
            picSplitv.Tag = X
            picSplitv.BackColor = &H808080
            picSplitv.ZOrder 0
        End If
    End SubPrivate Sub picSplitv_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            If picSplitv.Left >= (100 - X) And picSplitv.Left <= (Me.ScaleWidth - 100 - X) Then picSplitv.Left = picSplitv.Left + X - CInt(picSplitv.Tag)
        End If
    End SubPrivate Sub picSplitv_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
        If Button = vbLeftButton Then
            Picture1.Width = picSplitv.Left - 80
            Picture2.Left = picSplitv.Left + 50
            Picture2.Width = Width - picSplitv.Left - 250
            Picture3.Left = Picture2.Left
            Picture3.Width = Picture2.Width
            picSplith.Left = Picture2.Left
            picSplith.Width = Picture2.Width
            
            picSplitv.BackColor = &H8000000F
            ReleaseCapture
        End If
    End Sub
    代码已经发给你了