Reputation: 15
I have a question that I can have a form be shown in front of the mother form but still be able to not be seen say I click on Chrome. Topmost property will not work in this case because if I click on Chrome it still shows. I can not find anything online and I am a novice VB.net programmer.
Upvotes: 0
Views: 506
Reputation: 54457
I believe that what you're looking for is a modeless dialogue or, in .NET parlance, an owned form. An owned form will always be displayed in front of its owner, even if the owner has focus, and will be minimised and closed with its owner too. It acts pretty much as part of its owner, but in a separate form. An example of an owned form is the Visual Studio Find & Replace dialogue.
There are a number of ways to create an owned form, e.g.
Dim f As New SomeForm
f.Owner = Me
f.Show()
or:
Dim f As New SomeForm
f.Show(Me)
You can also make a default instance owned, e.g.
SomeForm.Show(Me)
Upvotes: 5