-1

I am developing one standalone tool in winforms using C#, in which I want the labels to be grows based on the screen resolution.

Kindly help me with the solution.

  • Try using WPF....WPF's xaml allows for easily creating scaleable views....Winforms is a bit outdated. – Bernard Walters Jun 27 '18 at 08:50
  • Possible duplicate of [How to write WinForms code that auto-scales to system font and dpi settings?](https://stackoverflow.com/questions/22735174/how-to-write-winforms-code-that-auto-scales-to-system-font-and-dpi-settings) – 41686d6564 stands w. Palestine Jun 27 '18 at 09:12
  • It is pretty difficult to mess this up, the form's AutoScaleMode property takes care of it. It has been done. – Hans Passant Jun 27 '18 at 09:16

1 Answers1

0

Below is the solution for this question.

 private void Form1_Resize(object sender, EventArgs e)
{
    label1.Font = new Font(this.Font.FontFamily, this.Width / 100);//you can set the font size yourself
}