asp. net calls the system method that sets the font text box

  • 2021-01-18 06:22:34
  • OfStack

asp.net calls the system to set the font text box method, which is a very practical skill in web development. The specific implementation steps are as follows:

1. Call the system font text box

First, right-click -- in the bin folder > Add a reference -- > In the net TAB, select: System.Windows.Forms > determine

Then introduce in the cs file:


using System.Windows.Forms; 

Add the following code:


FontDialog fd = new FontDialog();
fd.ShowDialog().ToString();

You can call up the text box of the system setting font.

2. Use the FontDialog pop-up text box to set the font style and size


FontDialog fd = new FontDialog();
fd.ShowDialog().ToString();
Label1.Font.Name = fd.Font.FontFamily.Name.ToString();
Label1.Font.Size = Convert.ToInt32(fd.Font.Size);

Hope this article described to everybody asp.net program design is helpful.


Related articles: