Click to See Complete Forum and Search --> : how to create a program's interface and behave like vb


xixi
July 17th, 2001, 11:15 PM
i want to know how to realize a program with 3 or more forms ,these forms can
dock and drag ,they can float.in summary ,it like vb.
Thanks very much in advance.

dafabe
July 18th, 2001, 06:19 AM
use the
form.show command in a command button
eg. 3 forms frm1,frm2,frm3
put the code in a command button on frm1 (frm1.show)

-DAVE

Clearcode
July 18th, 2001, 06:35 AM
Tricky.

The main form needs to be an MDIForm which you create by selecting Add->New MDIForm option.

The docking windows need to be MDIChild windows. There is an MDIChild property on the form that you set to True to make this happen.

To make a form look docked you need to have a picturebox that is docked on the MDI parent and use the SetParent() api call to put the MDI child form inside this picture box. To undock the form call SetParent again to set the parent to be the MDI form.

Hope this helps,
Duncan

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.

xixi
July 18th, 2001, 08:43 PM
first,i appreciate your help very much.
i am a beginner,i need help very much.i want to realize when a mdichild windows dock(like toolbar widown in vb),other window(like program widown in vb)resize itself.just do it like vb.
if there is a .zip example, please mail me.that is great.thanks in advance.

Cakkie
July 19th, 2001, 02:43 AM
Here you go
http://www.planetsourcecode.com/xq/ASP/txtCodeId.2198/lngWId.1/qx/vb/scripts/ShowCode.htm

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

xixi
July 19th, 2001, 07:15 AM
i am a vb beginner,it is hard to organize these codes for me. I would love to download the source for this but the link the author gave doesn't seem
to work.i don't know how to do .help!! i need a .zip program.thank in advance

John G Duffy
July 19th, 2001, 07:41 AM
I tried Cakkies link and had no problems. Try again. If it still does not work go to Http://www.Planet-Source-Code.com/vb and search on "Create a Dockable" (Without the quotes of course) and it will show as the second hit.

John G

Cakkie
July 19th, 2001, 08:32 AM
Just download Winzip or something, it can be found on every corner of the internet. (try http://www.winzip.com)

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

xixi
July 20th, 2001, 07:23 AM
first ,i appreciate men who help me,especial Cakkie.
I think i can't express my meaning exactly.i can link cakkie's url,but i hope the program is a .zip file but copy and paste.
now i want to know when a form change its size by drag its edge,what event happen?i tried form_resize,but it doesn't work .thank in advance.

xixi
July 20th, 2001, 07:52 AM
hi .i found a good example about docking form.
<a>http://www.planet-source-code.com/xq/ASP/txtCodeId.23664/lngWId.1/qx/vb/scripts/ShowCode.htm</a>
i thank everyone who help me.