Home All Groups Group Topic Archive Search About

TopMost Form within a .net application

Author
14 Feb 2006 9:44 AM
Sam
Hi,
How can I have a form that is TopMost only within the application it
belongs to?

1.I can't use ShowDialog, as it would be modal and I want the user to
be able to interact with controls in the main form.

2.TopMost property makes it being above ALL windows, including those
that do not belong to the application. I don't want that to happen.

Can you help?
Thanks

Author
14 Feb 2006 11:17 AM
Herfried K. Wagner [MVP]
"Sam" <samuelberthe***@googlemail.com> schrieb:
> How can I have a form that is TopMost only within the application it
> belongs to?
>
> 1.I can't use ShowDialog, as it would be modal and I want the user to
> be able to interact with controls in the main form.
>
> 2.TopMost property makes it being above ALL windows, including those
> that do not belong to the application. I don't want that to happen.

\\\
Dim f As New Form1()
f.Owner = <main form>
f.Show()
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
14 Feb 2006 11:51 AM
Sam
Hi Herfried
Great ! I've removed TopMost = True, and Iadded f.Owner  = main form
and it works just as I wanted.

Many Thanks !