TopMost Form within a .net application

S

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
 
H

Herfried K. Wagner [MVP]

Sam said:
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()
///
 
S

Sam

Hi Herfried
Great ! I've removed TopMost = True, and Iadded f.Owner = main form
and it works just as I wanted.

Many Thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top