1 Attachment(s)
[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:
Attachment 184798
Warm regards/.
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.
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
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.
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
Re: [RESOLVED] Dock-able tool windows (How?)
ok try that code
i cant fix reloading shadow
but now it cant move to top
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)