用什么方法实现在PictureBox中输出文本?

wendao 2002-04-12 06:30:02
用什么方法实现在PictureBox中输出文本?
...全文
64 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wendao 2002-04-12
  • 打赏
  • 举报
回复
谢谢大家。
thirdapple 2002-04-12
  • 打赏
  • 举报
回复
可以看看这个实现特殊效果的函数
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就行了
pl5th2001 2002-04-12
  • 打赏
  • 举报
回复
在PictureBox中加个textbox,设置成颜色一样就行了
wangsitao 2002-04-12
  • 打赏
  • 举报
回复
Private Sub Command1_Click()
Me.Picture1.CurrentX = 100
Me.Picture1.CurrentY = 100
Picture1.Print "ABC"
End Sub

7,765

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧