Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27411

VS 2022 Child form in front of the controls on parent form

$
0
0
Hi! :)

I have a parent form with a panel and some buttons and labels.
Then I have a child form which is shown by clicking on a button on the parent form.

However, when the child form is shown, it is in front of the parent form, but behind the buttons and all of that.
How do I change this, so that the child form is in front of everything?

Code:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim frm1 As New Form3
frm1.MdiParent = Me
frm1.TopMost = True
frm1.Show()

(I have also tried using " frm1.BringToFront ", but doesn't help...)

Thanks!

Viewing all articles
Browse latest Browse all 27411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>