Author Topic: How to use "AutoCAD Dockable Container" ?  (Read 2686 times)

0 Members and 1 Guest are viewing this topic.

itcad

  • Guest
How to use "AutoCAD Dockable Container" ?
« on: June 09, 2009, 08:46:00 PM »
How to use "AutoCAD Dockable Container" ?
reference:   http://www.jrl-e.com/index.htm

Who can give me a  good example?

Below is an example of a VB implemented IRetrieveDockableContainer:

‘ Global variable so the interface can be used at a later time if needed.
Dim dockContainer As AcadDockableContainer
Implements IRetrieveDockableContainer

Private Sub IRetrieveDockableContainer_SetDockContainer(ByVal newVal As IAcadDockableContainer)
   ‘ Keep this interface around by assigning it to a global variable.
   Set dockContainer = newVal

   ‘ Allow docking only on the left and right sides of AutoCAD
   dockContainer.EnableDockPositions = acDockLeft + acDockRight

   ‘ We want the window to appear as a floating window the very first time.
   ‘ The size of the floating window is specified below.
   Dim rect(0 To 3) As Integer
   rect(0) = 50 ' left
   rect(1) = 50 ' top
   rect(2) = 300 ' right
   rect(3) = 300 ' bottom

   dockContainer.SetPreferredDockPosition acFloating, rect
End Sub