R
Rolf Welskes
Hello,
I have the following:
..net 1.1 application (must be), on windows xp
one form (via designer).
one userControl with labels (via designer), BUT the usercontrol is NOT added
to the form via designer.
Now at runtime the userCtrl01 is added in the form:
private void btnNext_Click(object sender, System.EventArgs e)
{
MyUserCtrl userCtrl01 = new MyUserCtrl();
userCtrl01.Location = .............;
userCtrl01.Size = .............;
this.Controls.Add(userCtrl01);
this.ResumeLayout(true);
}
All this is done when windows xp has setting to 96dpi.
All works fine.
Now I change windows xp to 120dpi.
All other forms (made by designer) work fine with 120dpi.
But this form with dynamic added userCtrl does not.
First: The usercontrol is not set to the right size; the fonts are larger as
it's right for 120dpi, but the size of the userctrl is the same as at 96dpi.
If I now make a trick to get this, it works, but then the labels in the
usercontrol have not the right size.
What is to do, that all work with 96dpi AND 120dpi.
I cannot seet this at development time because it's a product which runs on
different systems.
Thank You for any help.
Rolf Welskes
I have the following:
..net 1.1 application (must be), on windows xp
one form (via designer).
one userControl with labels (via designer), BUT the usercontrol is NOT added
to the form via designer.
Now at runtime the userCtrl01 is added in the form:
private void btnNext_Click(object sender, System.EventArgs e)
{
MyUserCtrl userCtrl01 = new MyUserCtrl();
userCtrl01.Location = .............;
userCtrl01.Size = .............;
this.Controls.Add(userCtrl01);
this.ResumeLayout(true);
}
All this is done when windows xp has setting to 96dpi.
All works fine.
Now I change windows xp to 120dpi.
All other forms (made by designer) work fine with 120dpi.
But this form with dynamic added userCtrl does not.
First: The usercontrol is not set to the right size; the fonts are larger as
it's right for 120dpi, but the size of the userctrl is the same as at 96dpi.
If I now make a trick to get this, it works, but then the labels in the
usercontrol have not the right size.
What is to do, that all work with 96dpi AND 120dpi.
I cannot seet this at development time because it's a product which runs on
different systems.
Thank You for any help.
Rolf Welskes