W
wirejp
Guest
Hello,
I am using a Winform application in VS2017. I have a tabcontrol Form on Form1.vb[Designer] which is programmatically controlled by a combobox in a docking panel beside the tabcontrol Form. The user will be able to change the current tabbed document in combobox's dropdown list. The Form1 is set as the Mdi parent form. On the left of the Docking panel is the Panel with two command buttons to load two other forms into Form1.The problem occurs when I clicked the two command buttons, the two other forms load, but they load in the background (and they are not seen by the viewer) while the tabcontrol form remains topmost. How do I hide the tabcontrol form & the combobox in the docking panel so that when a user clicks the command buttons, the other two forms load topmost?
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim frm1 As New SubForm1
frm1.MdiParent = Me
frm1.Show()
End Sub
Private Sub BtnBooks_Click(sender As Object, e As EventArgs) Handles BtnBooks.Click
Dim frm1 As New SubForm1
frm1.MdiParent = Me
frm1.Show()
End Sub
Private Sub BtnAuthor_Click(sender As Object, e As EventArgs) Handles BtnAuthor.Click
Dim frm2 As New SubForm2
frm2.MdiParent = Me
frm2.Show()
End Sub
Thank you in advance for your help.
Continue reading...
I am using a Winform application in VS2017. I have a tabcontrol Form on Form1.vb[Designer] which is programmatically controlled by a combobox in a docking panel beside the tabcontrol Form. The user will be able to change the current tabbed document in combobox's dropdown list. The Form1 is set as the Mdi parent form. On the left of the Docking panel is the Panel with two command buttons to load two other forms into Form1.The problem occurs when I clicked the two command buttons, the two other forms load, but they load in the background (and they are not seen by the viewer) while the tabcontrol form remains topmost. How do I hide the tabcontrol form & the combobox in the docking panel so that when a user clicks the command buttons, the other two forms load topmost?
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim frm1 As New SubForm1
frm1.MdiParent = Me
frm1.Show()
End Sub
Private Sub BtnBooks_Click(sender As Object, e As EventArgs) Handles BtnBooks.Click
Dim frm1 As New SubForm1
frm1.MdiParent = Me
frm1.Show()
End Sub
Private Sub BtnAuthor_Click(sender As Object, e As EventArgs) Handles BtnAuthor.Click
Dim frm2 As New SubForm2
frm2.MdiParent = Me
frm2.Show()
End Sub
Thank you in advance for your help.
Continue reading...