
c#winform怎么把系统字库的字体大小读取到combobox 5
1个回答
展开全部
C# code
PrivateFontCollection p_Font = new PrivateFontCollection();
byte[] b_Font = new byte[Mentalarithmetic.Properties.Resources.DS_DIGIT.Length];
IntPtr MeAdd = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(byte)) * b_Font.Length);
Marshal.Copy(Mentalarithmetic.Properties.Resources.DS_DIGIT, 0, MeAdd, Mentalarithmetic.Properties.Resources.DS_DIGIT.Length);
p_Font.AddMemoryFont(MeAdd, b_Font.Length);
m_ShowNumber.Font = new Font(p_Font.Families[0],18,FontStyle.Bold|FontStyle.Regular);
PrivateFontCollection p_Font = new PrivateFontCollection();
byte[] b_Font = new byte[Mentalarithmetic.Properties.Resources.DS_DIGIT.Length];
IntPtr MeAdd = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(byte)) * b_Font.Length);
Marshal.Copy(Mentalarithmetic.Properties.Resources.DS_DIGIT, 0, MeAdd, Mentalarithmetic.Properties.Resources.DS_DIGIT.Length);
p_Font.AddMemoryFont(MeAdd, b_Font.Length);
m_ShowNumber.Font = new Font(p_Font.Families[0],18,FontStyle.Bold|FontStyle.Regular);
追问
可以写下注释吗 谢谢
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询