求助:在VB中怎么设置字体为汉字啊?
求助:在VB中怎么设置字体为汉字啊?谢谢!! “设置字体为汉字”是什么意思啊
不知道下面这个是否满足要求
Sub fontset()<BR>Dim mytextstyle As AcadTextStyle<BR>Dim typeFace As String<BR>Dim Bold As Boolean<BR>Dim Italic As Boolean<BR>Dim charSet As Long<BR>Dim PitchandFamily As Long
ThisDrawing.ActiveTextStyle.GetFont typeFace, _<BR>Bold, Italic, charSet, PitchandFamily
typeFace = "宋体"<BR>ThisDrawing.ActiveTextStyle.SetFont typeFace, _<BR>Bold, Italic, charSet, PitchandFamily<BR>ThisDrawing.Regen acActiveViewport<BR>Set mytextstyle = ThisDrawing.TextStyles.Add("st")<BR>mytextstyle.fontFile = "C:\Program Files\AutoCAD 2002\Fonts\st.shx"<BR>End Sub 就是设置当前字体为“宋体”,但上面的方法我试了不行啊!
求大家帮帮! 怎么没人帮忙啊? Public Sub ttee()<BR>Dim ts As AcadTextStyle
Set ts = ThisDrawing.TextStyles.Add("Test1")<BR>ts.SetFont "", False, False, 0, 1<BR>ts.BigFontFile = "gbcbig.shx"<BR>ts.fontFile = "gbenor.shx"<BR>Dim oText As AcadText<BR>Dim pnt(2) As Double<BR>Set oText = ThisDrawing.ModelSpace.AddText("明经通道", pnt, 5)<BR>oText.StyleName = "test"<BR>End Sub<BR> 谢谢拉! oText.StyleName = "test"应该是"test1"吧赫赫<BR> 还请问一下,如何设置字体的大小,如为10
oText.height=10 使用大字体
页:
[1]