Well, this is technically easy to do by repeating the tab “Manage” tabs and multiplying the “Point” and “Size” properties by the scaling factor. But it becomes terribly difficult if you start to consider the properties of Dock and Anchor.
On the contrary, the easiest approach is to let the Form class scalers do the work for you. You will need to add controls to the tab pages before the download event fires. Do it in the constructor.
Quick tip to avoid the pain of switching the DPI setting to check your code: add this to the form constructor to trigger the scaling logic:
protected override void OnLoad(EventArgs e) {
this.Font = new Font(this.Font.FontFamily, this.Font.Size * 120 / 96);
base.OnLoad(e);
}
source
share