This code gives you the ability to create a 'floating toolbar' within your application. The old SetWindowWord function is only good for 16-bit applications, so it won't run under a 32-bit OS (like NT4). The API call you should use if you are programming a 32-bit application is SetWindowLong. It works the same way as SetWindowWord, only uses DWORD(Long) values instead of WORD values for the 32-bit OS.
Inputs
You will need to create 2 forms (Form1 & Form2).
On Form1, place a Command button (Command1)
On Form2, set the Window Style to 4-FixedToolWindow (not nessesary)
Assumes
This function will make a form a 'child window' of any form you specify.
Returns
Sets Form2 to be a child of Form1 (giving it a 'floating toolbar' effect)
Side Effects
Won't work with 16-bit OS's. Use SetWindowWord for 16-bit.
API Declarations' Place this code into a module
Public Const GWL_HWNDPARENT = (-8)
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long