04-15-2002, 07:26 AM
Im making a dialog editor and i want it to look pretty much the same as vb's ide is, where the x,y coords starts right after the width of the toolbox, if you understand what i mean. How can i do this. Also how can i make the toolbox and properties window "pop" into the mdi form just like in vb.
04-15-2002, 07:33 AM
I think for the x,y coordinates part you can use:
x = x + toolbar.width 'Where toolbar is the name of your toolbar
but if your toolbar is horizontally along the top of your screen
it should be x = x + toolbar.height
y = y 'Stays the same
And if you want the y axis inverted to be like a normal plotting quadrant (Q1) then
Y = screen.height - Y
hope this helps with the coord's part.
04-15-2002, 10:18 AM
If you mean window docking by "pop" then its not that easy. Actually its quite hard.
First off I'd try using a timer to detect where the windows are at every second or so, and if they're within a certain distance of another window then move them to align properly.
To make them actually part of the parent window.... I'm not sure. Possibly requires subclassing and heavy API.
04-15-2002, 01:33 PM
Dockable windows are hard to do, but it is perfectly possible to do it without subclassing. You just write a *lot* of code.
04-15-2002, 02:13 PM
What about if the windows are actually merging with each?http://www.visualbasicforum.com/attachment.php?postid=112736
How does one attach images to a post?!
04-17-2002, 01:54 AM
I want the form to merge with the mdi form, like in vb, if its possible.
04-17-2002, 07:59 AM
Place a picturebox on the left side of your MDI window. Place a second picturebox, one with no border, within the first picturebox. Create a toolwindow the same size as the picturebox. Use the SetParent API function to move the inner picturebox from the outer picturebox to the toolwindow. Hide the outer picturebox. This simulates an undocking effect, which I find quite cheap, but also quite effective if done correctly.