可以看看这个实现特殊效果的函数 Public Function raisetext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant) Dim i As Integer f.ForeColor = RGB(255, 255, 255) For i = 1 To width f.CurrentX = x - i f.CurrentY = y - i f.Print s Next i f.ForeColor = RGB(0, 0, 0) For i = 1 To width f.CurrentX = x + i f.CurrentY = y + i f.Print s Next i f.ForeColor = COLOR f.CurrentX = x f.CurrentY = y f.Print s End Function Public Function dectext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant) Dim i As Integer f.ForeColor = RGB(0, 0, 0) For i = 1 To width f.CurrentX = x - i f.CurrentY = y - i f.Print s Next i f.ForeColor = RGB(255, 255, 255) For i = 1 To width f.CurrentX = x + i f.CurrentY = y + i f.Print s Next i f.ForeColor = COLOR f.CurrentX = x f.CurrentY = y f.Print s End Function Public Function slidetext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant) Dim i As Integer f.ForeColor = RGB(60, 60, 60) For i = 1 To width f.CurrentX = x + i f.CurrentY = y + i f.Print s Next i f.ForeColor = COLOR f.CurrentX = x f.CurrentY = y f.Print s End Function Public Function shadowtext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant) Dim i As Integer f.ForeColor = RGB(60, 60, 60) For i = 1 To width f.CurrentX = x + width f.CurrentY = y + width f.Print s Next i f.ForeColor = COLOR f.CurrentX = x f.CurrentY = y f.Print s End Function 其实如果不是特殊效果的话用Print就行了
Public Function raisetext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant)
Dim i As Integer
f.ForeColor = RGB(255, 255, 255)
For i = 1 To width
f.CurrentX = x - i
f.CurrentY = y - i
f.Print s
Next i
f.ForeColor = RGB(0, 0, 0)
For i = 1 To width
f.CurrentX = x + i
f.CurrentY = y + i
f.Print s
Next i
f.ForeColor = COLOR
f.CurrentX = x
f.CurrentY = y
f.Print s
End Function
Public Function dectext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant)
Dim i As Integer
f.ForeColor = RGB(0, 0, 0)
For i = 1 To width
f.CurrentX = x - i
f.CurrentY = y - i
f.Print s
Next i
f.ForeColor = RGB(255, 255, 255)
For i = 1 To width
f.CurrentX = x + i
f.CurrentY = y + i
f.Print s
Next i
f.ForeColor = COLOR
f.CurrentX = x
f.CurrentY = y
f.Print s
End Function
Public Function slidetext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant)
Dim i As Integer
f.ForeColor = RGB(60, 60, 60)
For i = 1 To width
f.CurrentX = x + i
f.CurrentY = y + i
f.Print s
Next i
f.ForeColor = COLOR
f.CurrentX = x
f.CurrentY = y
f.Print s
End Function
Public Function shadowtext(s As String, x As Integer, y As Integer, width As Integer, COLOR As Long, f As Variant)
Dim i As Integer
f.ForeColor = RGB(60, 60, 60)
For i = 1 To width
f.CurrentX = x + width
f.CurrentY = y + width
f.Print s
Next i
f.ForeColor = COLOR
f.CurrentX = x
f.CurrentY = y
f.Print s
End Function
其实如果不是特殊效果的话用Print就行了