一,调用系统字体文本框 
首先在bin文件夹右击--添加引用--.net标签里选择System.Windows.Forms--确定 

然后在cs文件里引入,using System.Windows.Forms; 

在代码里写 

C#代码  c# asp.net 调用系统设置字体文本框
  1. FontDialog fd = new FontDialog();  
  2. fd.ShowDialog().ToString();  



就可以调出系统设置字体的那个文本框了 

二,用FontDialog弹出的文本框设置字体样式和大小 

C#代码  c# asp.net 调用系统设置字体文本框
    1. FontDialog fd = new FontDialog();  
    2. fd.ShowDialog().ToString();  
    3.   
    4. Label1.Font.Name = fd.Font.FontFamily.Name.ToString() ;  
    5.   
    6. Label1.Font.Size = Convert.ToInt32(fd.Font.Size);  

相关文章:

  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-08-28
  • 2022-01-22
  • 2021-06-12
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-12-06
  • 2021-10-01
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
相关资源
相似解决方案