Results 1 to 7 of 7

Thread: [RESOLVED] Dock-able tool windows (How?)

  1. #1

    Thread Starter
    Hyperactive Member pourkascheff's Avatar
    Join Date
    Apr 2020
    Location
    LocalHost
    Posts
    384

    Resolved [RESOLVED] Dock-able tool windows (How?)

    IF THIS IS A DUPLICATED THREAD, MESSAGE ME THE ORIGINAL AND DELETE THIS ONE. THANK YOU IN ADVANCED.

    How can a tool window form be docked in a parent (Mdi I suppose) form? Consider you want to show/hide a property grid for a control. Does it require another control to add? (i.e. ToolStrip/ToolBar) I couldn't find any clues even in Microsoft documentations/msdn. When you want to move them, following selectable options will appear in parent/main form:
    Name:  Untitled.png
Views: 991
Size:  2.3 KB
    Warm regards/.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Dock-able tool windows (How?)

    There is no standard control that will do that. There was a free library called DockPanelSuite that did provide some of that sort of functionality but I'm not sure that it has been maintained lately and I'm fairly sure that it didn't provide the different drop targets that VS does.

    DockPanelSuite is here. As you're using VS 2012, it's more current than you.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Fanatic Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey, down the old sides of Fatih
    Posts
    607

    Re: Dock-able tool windows (How?) way vs2010

    hmm is toolbar child of your mdi??? if toolbar is child then you can do that: (tested on vs2010)
    Code:
    
    
           Private Sub Form2_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
            If Me.Left < (dockable area) Or Me.Left = 0 Then
                Me.Left = 0
            End If
        End Sub
    Last edited by gaouser; May 11th, 2022 at 05:03 AM.

    got nuthin' to do but to make a new project, hype, then give up

    Check out all my cool stuff btw
    VB: EveryDiscord, a Discord client made fully in VB6 | MSPaint Modifier, a VB6-based MSPaint hooking engine, experimental | OpenIM, a fully VB6 instant messaging service based on TCP/IP connections | Kadooki (Overall the AltWWW project), the WWW re-imagined by me with continuations of HTML3.2's parts. | ClaFeed, A little feed algorithm I have been developing for a Twitter-style system. | CfmOS PC, my project CfmOS ported to VB6 in order to prototype faster, often lags on updates though!

    C: LegacyResource, a little ResHacker ripoff | CfmOS, A mobile OS designed to mimic AOSP (Stock Android) on an ESP32-S3, featuring a full bytecode architecture

  4. #4

    Thread Starter
    Hyperactive Member pourkascheff's Avatar
    Join Date
    Apr 2020
    Location
    LocalHost
    Posts
    384

    Re: Dock-able tool windows (How?)

    Hm, I will consider this method as a final way to mimic such desirable behavior. I tested the code. It works fine but you should type a limit as integer instead of '(dockable area)' part. Plus your form will be still movable (refreshes the form shadow which is bad for a good looking UI design) also can be closed, maximized and ...

    I highly recommend other users who came here to make toolform boarder style as 'none' and consider show/hide buttons. For me dock position for each child form is different as are kind of like an OSK and built in calculator in bottom and right of the parent form respectively.

  5. #5
    Fanatic Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey, down the old sides of Fatih
    Posts
    607

    Re: [RESOLVED] Dock-able tool windows (How?)

    you can use dims

    Code:
    dim itsame as boolean
           Private Sub Form2_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
            If Me.Left < (dockable area) Or Me.Left = 0 Then
                Me.Left = 0
    me.height = 'yourmdi.height
    itsame= true
    else
     itsame = false
            End If
    if itsame = true then
    me.top = 0
    end if
        End Sub

    got nuthin' to do but to make a new project, hype, then give up

    Check out all my cool stuff btw
    VB: EveryDiscord, a Discord client made fully in VB6 | MSPaint Modifier, a VB6-based MSPaint hooking engine, experimental | OpenIM, a fully VB6 instant messaging service based on TCP/IP connections | Kadooki (Overall the AltWWW project), the WWW re-imagined by me with continuations of HTML3.2's parts. | ClaFeed, A little feed algorithm I have been developing for a Twitter-style system. | CfmOS PC, my project CfmOS ported to VB6 in order to prototype faster, often lags on updates though!

    C: LegacyResource, a little ResHacker ripoff | CfmOS, A mobile OS designed to mimic AOSP (Stock Android) on an ESP32-S3, featuring a full bytecode architecture

  6. #6
    Fanatic Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey, down the old sides of Fatih
    Posts
    607

    Re: [RESOLVED] Dock-able tool windows (How?)

    ok try that code

    i cant fix reloading shadow
    but now it cant move to top

    got nuthin' to do but to make a new project, hype, then give up

    Check out all my cool stuff btw
    VB: EveryDiscord, a Discord client made fully in VB6 | MSPaint Modifier, a VB6-based MSPaint hooking engine, experimental | OpenIM, a fully VB6 instant messaging service based on TCP/IP connections | Kadooki (Overall the AltWWW project), the WWW re-imagined by me with continuations of HTML3.2's parts. | ClaFeed, A little feed algorithm I have been developing for a Twitter-style system. | CfmOS PC, my project CfmOS ported to VB6 in order to prototype faster, often lags on updates though!

    C: LegacyResource, a little ResHacker ripoff | CfmOS, A mobile OS designed to mimic AOSP (Stock Android) on an ESP32-S3, featuring a full bytecode architecture

  7. #7
    Fanatic Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey, down the old sides of Fatih
    Posts
    607

    Re: [RESOLVED] Dock-able tool windows (How?)

    trick: (not that dx9vb's maker) if you want to use screen like mdi then use
    me.height = 199999 '(an inpossible to view resolution)(dont use scale or move by height&width code)

    got nuthin' to do but to make a new project, hype, then give up

    Check out all my cool stuff btw
    VB: EveryDiscord, a Discord client made fully in VB6 | MSPaint Modifier, a VB6-based MSPaint hooking engine, experimental | OpenIM, a fully VB6 instant messaging service based on TCP/IP connections | Kadooki (Overall the AltWWW project), the WWW re-imagined by me with continuations of HTML3.2's parts. | ClaFeed, A little feed algorithm I have been developing for a Twitter-style system. | CfmOS PC, my project CfmOS ported to VB6 in order to prototype faster, often lags on updates though!

    C: LegacyResource, a little ResHacker ripoff | CfmOS, A mobile OS designed to mimic AOSP (Stock Android) on an ESP32-S3, featuring a full bytecode architecture

Tags for this Thread

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