Dear All,
regarding my previous request, please let me specify what I want to achieve:
You may get an idea of what I mean by looking at this: http://www.ablebits.com/excel-worksheets-manager-addins/index.php - This add-in is provided by a russian company. It was programmed using Delphi and works with Excel 2000 onwards. Unfortunately they do not provide this technique to others.
I therefore tried to find a solution on my own and thought that the Docking Pane component would be a good starting point.
In the Excel VBE I made a reference to the Xtreme Docking Pane Control (->Tools -> References ...) and typed in the following code into a standard module:
Option Explicit ' ' Retrieve a handle to the top-level window (Parent is always the Desktop) Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long ' ' Retrieve a handle to the top-level window in other parents Private Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" ( _ ByVal hWndParent As Long, _ ByVal hwndChildAfter As Long, _ ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long
Sub xlDockPane() Dim xlAppHandle As Long Dim xlDeskHandle As Long Dim DockingPaneManager As XtremeDockingPane.DockingPane Dim A As XtremeDockingPane.Pane xlAppHandle = FindWindow("XLMAIN", Application.Caption) If xlAppHandle = 0 Then xlAppHandle = FindWindow("XLMAIN", vbNullString) End If ' find the Excel desktop xlDeskHandle = FindWindowEx(xlAppHandle, 0, "XLDESK", vbNullString) Set DockingPaneManager = New DockingPane DockingPaneManager.AttachToWindow xlDeskHandle Set A = DockingPaneManager.CreatePane(1, 400, 400, DockLeftOf, Nothing) End Sub
Also syntactically correct, the code above doesn't work.
Thus, any hints are very welcome.
BRGDS
Armin
|