Can you please advise what I’m doing wrong, I need to display a form in TabControl dynamically at run time but displayed form in tab control is missing bottom part of form which is hidden behind tab name, brown color panel docked at the bottom of the form.
Dim f As New TestWindowForm
f.TopLevel = False
f.FormBorderStyle = Windows.Forms.FormBorderStyle.None
f.WindowState = FormWindowState.Maximized
TabInvoice.Text = “Invoice”
TabControl1.TabPages.Add(TabInvoice)
TabInvoice.Controls.Add(f)
TabInvoice.Dock = DockStyle.Fill
f.Show()
TabControl1.SelectTab(TabInvoice)
I cannot reproduce. Need a small test case. In general, you don’t need to change the Dock property of the TabPage, they are always only docked to fill. And the child form inside the TabPage should not be maximized, set the Dock = Fill for the form.
Please login first to submit.