-
A problem for all those who can use VB to the highest standard: as far as I can tell (as a native C++ user) there is no way I can sub-class a window in VB...
I want to stick a tool-bar inside another window (I have the hWnd) that looks like a floating window inside that one. It cannot be moved outside its window, becomes covered by that application's menus, doesn't disappear when clicking on the host window, but isn't always on top, Intercepts any keyboard or mouse events that apply to it WITHOUT yielding focus from the host window.
Can this be done in VB?
JamesW
-
-
Sorry, this isn't much use... I need to get a much deeper type of sub-classing where the window effectively owns my form...
Any ideas?
-
Sounds alot like an MDI Parent/Child Releationship to me...
If you don't want to use an MDI Form, then use the SetParent API, ie.
Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Load()
Form2.Show
SetParent Form2.hWnd, hWnd
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]