AttachToWindow Method
Description
Specifies the control that will contain the CommandBars.
Syntax
Public Sub AttachToWindow( _
ByVal hWnd As Integer _
)
Parameters
- hWnd: Handle to a control that will be the container for the CommandBars.
Remarks
Any control with a hWnd or Handle property can be used as a container for the Command Bars. The CommandBars will treat the container control exactly like when it is added to a form. The CommandBars will resize to the container control and can be docked to the edges of the container control.
The picture below shows a RTF TextBox control that contains the CommandBars.

Example
This sample illustrates how to specify the parent container for a CommandBars control.
CommandBars.AttachToWindow rtfText.hWnd
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.