Results 1 to 9 of 9

Thread: Docking windows

  1. #1
    Seth DK
    Guest

    Docking windows

    Does anyone know how I can easily make docking windows (regular forms) in VB6?

    I think it is not possible to do just ike that, but does anyone have an easy-to-understand source code example??? The form is not an MDI form, if that makes any difference...!!

  2. #2
    Yash_Kumar
    Guest
    Add the attached module to your project. Now all you have to do is add the following lines to all the forms that you want docking to be enabled. The rest will be taken care of by the code. Also, the forms will dock to each other and with the screen.

    Code:
    Private Sub Form_Load()
        'With this little Command you enable Form-Docking
        DockingStart Me
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        'And with this you'll deactivate it!
        'That's all you need to do!
        DockingTerminate Me
    End Sub

  3. #3
    Seth DK
    Guest

    Thanks man!

    Thanks alot! Sounds like just what I need...will have to take a look later

  4. #4
    Fanatic Member
    Join Date
    Mar 2001
    Location
    Southern California
    Posts
    733
    What does docking do?

  5. #5
    Yash_Kumar
    Guest
    Docking basically means that forms get attracted to other objects with a magnetic pull. In this case, if you bring the form near the edge of a screen or any other form, they get pulled towards each other.

  6. #6
    Fanatic Member
    Join Date
    Mar 2001
    Location
    Southern California
    Posts
    733
    Why would you want to dock forms? I'm pretty new to some of this stuff. please forgive the ignorance.

  7. #7
    Yash_Kumar
    Guest
    Good question, could someone explain me why I wasted my time to write all this code?

    Ok look, enabling the docking of forms makes things easier for the user. It makes managing the windows for him more easy. And most of all, it looks cool. Many softwares use docking to allow the user to easily manage their windows.

  8. #8
    Seth DK
    Guest
    When docking forms to an "owner form" it is so much easier to be a user of the software. Take VB for an axample (suppose you know that one...;-))

    If VB did not dock the windows (toolbars, project explorer, properties etc.) to the parent window it would look terrible!!

    Try for yourself to pull those windows out of their docking locations and you end up with one thing only: CONFUSION!! ("Where is that f...ing window when I need it??")

  9. #9
    Addicted Member
    Join Date
    Mar 2002
    Location
    Seattle, WA USA
    Posts
    216
    The code examples above are brilliant! Is there anyway I can dock my form windows to other applications? For exmaple, I want to dock Winamp with the plug-in I made for it.
    VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
    MCP & A+ Certified. Looking for a job in the Seattle, WA area.

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