Results 1 to 15 of 15

Thread: Resizable Frames

Threaded View

  1. #11
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Maybe this helps:

    VB Code:
    1. Private Moving As Boolean
    2. Public PosX As Long
    3.  
    4.  
    5. Private Sub Separator_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    6.     Moving = True
    7. End Sub
    8.  
    9. Private Sub Separator_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    10.     If Moving Then
    11.         PosX = Separator.Left + x
    12.         If PosX < 0 Then PosX = 0
    13.         If PosX > ScaleWidth Then PosX = ScaleWidth - Separator.Width
    14.         Moving = False
    15.         ReDrawSeparator
    16.         Moving = True
    17.     End If
    18. End Sub
    19.  
    20. Private Sub Separator_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    21.     Moving = False
    22. End Sub
    23.  
    24. Private Sub ReDrawSeparator()
    25.     Dim fHeight As Single
    26.     Dim TopPos As Single
    27.    
    28.     If Me.WindowState = vbMinimized Then Exit Sub
    29.     TopPos = -TBAddress.Visible * (TBAddress.Height - 60)
    30.     TBAddress.Top = TopPos - TBAddress.Height
    31.     fHeight = Me.Height - TopPos - TV.Top - 200
    32.    
    33.     TV.Move 0, TopPos + 100, PosX, fHeight
    34.     Separator.Move PosX, TopPos + 100, ScaleX(3, vbPixels, vbTwips), fHeight
    35.     LV.Move PosX + Separator.Width, TopPos - 10, ScaleWidth - LV.Left, fHeight + 30
    36.     'Don't know why.. but the second time sizes the LV correctly
    37.     LV.Move PosX + Separator.Width, TopPos + 90, ScaleWidth - LV.Left, fHeight + 30
    38.    
    39.     TBAddress.Move 30, TBAddress.Top, ScaleWidth - 150
    40.     WEPath.Width = TBAddress.Width - WEPath.Left - 60
    41.     DoEvents
    42.    
    43. End Sub
    Last edited by Mc Brain; Jan 11th, 2002 at 07:22 PM.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width