Hi Jeff,
Are you sure you want to set the "parent" of the popup-form? Then you
cannot set the toplevel-property of the "child"-form to true (exception:
Cannot change top-level style of a parented control).
Usually, you want to set the owner of a popup-form, not the parent. That
way you prevent the popup-form from disappearing behind the owner form, and
is the owner form is closed, the owned form is closed as well.
Hope this helps,
Joris
> Hello,
>
[quoted text clipped - 9 lines]
>
> Jeff
Jeff Boeker - 20 Jun 2006 19:48 GMT
Hello Joris,
My popup form has to be modeless, i.e. still allow user to click on parent
form when popup form is shown. If I don't set the parent of the popup form I
can alt-tab and see just my dialog on top of another window.
I think it may be worthwhile to be owned as well for the auto closing.
Thanks,
Jeff
> Hi Jeff,
>
[quoted text clipped - 23 lines]
> >
> > Jeff
Joris Zwaenepoel - 21 Jun 2006 06:55 GMT
Have you tried it, setting the owner? If you alt-tab, or click on another
window then both the forms are hidden behind the new window in the front, or
both windows are shown in front of the other windows. You cannot have the
owner form hidden behind, and the popup form shown in front of another
application.
Joris
> Hello Joris,
>
[quoted text clipped - 35 lines]
> > >
> > > Jeff
Jeff Boeker - 22 Jun 2006 18:11 GMT
Actually my initial code was dlg.Show(this) which sets the owner. When I did
this I saw two entries in the task bar (and two entries when alt-tab). I
have now fixed this by setting the ShowInTaskBar to false.
Now my issue is that I need to restrict the dialog location to the client
area of the owner. When I force the modeless dialog to have the owner form
as parent it has the correct behavior.
Jeff
> Have you tried it, setting the owner? If you alt-tab, or click on another
> window then both the forms are hidden behind the new window in the front, or
[quoted text clipped - 43 lines]
> > > >
> > > > Jeff