I'm putting a UserControl inside a TabPage. When Not Maximized, the UserControl fills in the entire TabControl
However,ifImaximizethescreen,thereisaspacetotheright.
Iusedusercontrolwinforms"Anchor" or "Dock" property. So I tried the following
control.Dock = DockStyle.Fill
control.Dock = AutoScaleMode.None
I have tried it too, but it only centralizes the Usercontrol.
control.Anchor = AnchorStyles.None
control.Left = (tab.Width - control.Width) / 2
control.Top = (tab.Height - control.Height) / 2