this should do the trick for you.... you need the handle to the window of course -- you can always find that by using the FindWindow API.
Code:
Public Declare Function MoveWindow Lib "user32" (ByVal hWnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
MoveWindow wHandle, 100, 100, 800, 600, True
I think the only way you are going to be able to fake this and make it look somewhat realistic would be to subclass the form and intercept the caption's draw/paint message -- whatever that might be. if you take and make your tool window sizable, you'll see that you can't even size it to make it appear the way you want. since the tool window has a smaller caption than a regular window, i don't think windows is smart enough to compensate for the extra space -- besides, a little grey space isn't going to hurt anything.
Mars base one Username: Jim Davis Password: yCrm33
Posts
1,284
You're right, but... check out something:
In design mode, set a toolwindow's height property to 310.. then run the app.. the form looks like what i'm wanted.. then resize the form (with a timer or the same). then you cant set back to 310 twips via CODE...