Hi Doug,
I had noticed the height and width getting smaller. I can't imagine why this is by design. Thanks for the tip on setting the dockable property in the Show method. AT least with these figures I should be able to position it back how it was before visible = .F., but it's still a PITA :(
I think I'm just going to stick with a toolbar for now until I get more time to play around with the dockable form.
Thanks!
>Interesting. It turns out Top is moved down by SYSMETRIC(4) (the height of the window frame) + SYSMETRIC(34) (the height of a half-height caption, since dockable forms use that) and Left is moved over by SYSMETRIC(3) (the width of the window frame). Something you may not have noticed is that Height and Width are reduced accordingly. You can see that visually with this code:
omyForm1 = createobject('Form')
>omyForm1.HalfHeightCaption = .T.
>omyForm1.Visible = .T.
>
>omyForm = CREATEOBJECT("Form")
>omyForm.Dockable = 1
>?'Top1 ' + trans(omyForm.Top)
>?'Left1 ' + trans(omyForm.Left)
>suspend
>
>omyForm.Visible = .f.
>omyForm.Visible = .T.
>?'Top2 ' + trans(omyForm.Top)
>?'Left2 ' + trans(omyForm.Left)
>
>suspend
Notice that initially the dockable form is the same height as the non-dockable, but after you type RESUME in the Command window, it exactly fits inside the client area of the non-dockable form.
>
>I think this is by design. Dockable forms have a lot of weird issues. To control visibility, I usually set Dockable to .T. in the Show method so it does become visible until just before the form would have anyway.
>
>Doug