- UID
- 76071
- 积分
- 1505
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2003-8-30
- 最后登录
- 1970-1-1
|
发表于 2005-4-19 19:56:51
|
显示全部楼层
Sub Example_SetFont()
' This example find the font information for the active text style.
' It then changes the font to bold.
Dim typeFace As String
Dim Bold As Boolean
Dim Italic As Boolean
Dim charSet As Long
Dim PitchandFamily As Long
ThisDrawing.ActiveTextStyle.GetFont typeFace, Bold, Italic, charSet, PitchandFamily
MsgBox "The current text style has the following font properties:" & vbCrLf _
& "Typeface: " & typeFace & vbCrLf _
& "Bold: " & Bold & vbCrLf _
& "Italic: " & Italic & vbCrLf _
& "Character set: " & charSet & vbCrLf _
& "Pitch and Family: " & PitchandFamily
' Change the bold property
Bold = Not Bold
ThisDrawing.ActiveTextStyle.SetFont typeFace, Bold, Italic, charSet, PitchandFamily
MsgBox "The current text style has the following font properties:" & vbCrLf _
& "Typeface: " & typeFace & vbCrLf _
& "Bold: " & Bold & vbCrLf _
& "Italic: " & Italic & vbCrLf _
& "Character set: " & charSet & vbCrLf _
& "Pitch and Family: " & PitchandFamily
' Reset the font
Bold = Not Bold
ThisDrawing.ActiveTextStyle.SetFont typeFace, Bold, Italic, charSet, PitchandFamily
End Sub |
|