Re: Docking Misery !! Please Help !!
- From: "Henry Bartlett" <hambar@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 12:34:07 +1000
"Justin" <j.a.dorus@xxxxxxxxx> wrote
> I have 2 forms, a 'main' and a 'support'. They function completely
> seperately. What I'm looking to do is add a feature so that the user
> can dock the 'support' form within the 'main' form.
1. Add a method e.g. SetPosition (aTop, aLeft, aWidth, aHeight:
integer) to the public definitions section of your support form and
write a suitable implementation;. Use an impossible value (eg
IgnoreVal = -MaxInt) that your method will ignore (e.g. if aTop <>
IgnoreVal then Top := aTop;)
2. When you create your support form, make sure that you keep set a
reference var in your main form.
e.g.from the main form
SupportForm := tSupportForm.Create (Application.handle)
Or simply autocreate the support form.
3. Then you can dock your form from within the main form
e.g. (Watch the wrap)
SupportForm.SetPosition (0, 0, IgnoreVal, IgnoreVal); - docks at
top-left.
SupportForm.SetPosition (0, 0, IgnoreVal, Height); - docks at left
side.
SupportForm.SetPosition (Width-SupportForm.Width,
Height-SupportForm.Height, IgnoreVal, IgnoreVal); - docks at
bottom-right.
--
Henry Bartlett
Delphi Links Page:
( http://www.hotkey.net.au/~hambar/habit/delflink.htm )
.
- References:
- Docking Misery !! Please Help !!
- From: Justin
- Docking Misery !! Please Help !!
- Prev by Date: Opening an Access database in Delphi
- Next by Date: Re: Opening an Access database in Delphi
- Previous by thread: Docking Misery !! Please Help !!
- Next by thread: Copy graphics to word
- Index(es):
Relevant Pages
|