Get the hWnd from where?
If your control is not visible and your code, in your form that the control is on, needs the hWnd then simply provide a property that returns the ocx's hWnd
Just because it is invisible doesn't mean it has no hWnd. The only time it will not have an hWnd is if the Windowless property is TrueCode:Public Property Get hWnd() As Long hWnd = UserControl.hWnd End Property




Reply With Quote