怎样在窗体或者picturebox的指定坐标写字符

arrowcy 2005-04-07 03:43:17
比如说要在picturebox的(1000,1000)处写一个字符串,怎么写
...全文
103 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
arrowcy 2005-04-07
  • 打赏
  • 举报
回复
谢谢大家
pcwak 2005-04-07
  • 打赏
  • 举报
回复
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long

Sub Command1_Click()
Dim intCount As Integer, strString As String
strString = "Cool, text on screen !"
TextOut Me.Picture1.hdc, 100, 100, strString, Len(strString)
End Sub
wgf001 2005-04-07
  • 打赏
  • 举报
回复
是print出来吗?
写在控件中不行吗?
Gutta 2005-04-07
  • 打赏
  • 举报
回复
Private Sub Command1_click()
Picture1.CurrentX=1000
Picture1.CurrentY=1000
Picture1.Print "String"
End Sub

7,789

社区成员

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

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