用VB通过PictureBox控件载入图片,然后在图片上输入文字,最后将有文字的图片重新保存为图片,请问如何实现?
4个回答
展开全部
给你写个完整的 添加一个text 用于输入文字 添加一个CommonDialog控件 添加三个按钮
Private Sub Command1_Click()
On Error GoTo a
CommonDialog1.FileName = ""
CommonDialog1.ShowSave
SavePicture Picture1.Image, CommonDialog1.FileName
a:
End Sub
Private Sub Command2_Click()
Picture1.Print Text1
End Sub
Private Sub Command3_Click()
CommonDialog1.FileName = ""
CommonDialog1.ShowOpen
Picture1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
Picture1.FontSize = 50
Picture1.ForeColor = vbRed
Picture1.FontItalic = True
Picture1.AutoRedraw = True
Picture1.AutoSize = True
CommonDialog1.Filter = "JPEG Images(*.jpg;*.jpeg)|*.jpg;*.jpeg|"
Command1.Caption = "保存图片"
Command2.Caption = "输入文字"
Command3.Caption = "载入图片"
End Sub
Private Sub Command1_Click()
On Error GoTo a
CommonDialog1.FileName = ""
CommonDialog1.ShowSave
SavePicture Picture1.Image, CommonDialog1.FileName
a:
End Sub
Private Sub Command2_Click()
Picture1.Print Text1
End Sub
Private Sub Command3_Click()
CommonDialog1.FileName = ""
CommonDialog1.ShowOpen
Picture1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
Picture1.FontSize = 50
Picture1.ForeColor = vbRed
Picture1.FontItalic = True
Picture1.AutoRedraw = True
Picture1.AutoSize = True
CommonDialog1.Filter = "JPEG Images(*.jpg;*.jpeg)|*.jpg;*.jpeg|"
Command1.Caption = "保存图片"
Command2.Caption = "输入文字"
Command3.Caption = "载入图片"
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-04-14
展开全部
最简单的:
Private Sub Form_Load()
Picture1.AutoRedraw = True
Me.Picture1.Picture = LoadPicture("c:\1.jpg")
Picture1.Print "hello"
SavePicture Me.Picture1.Image, "c:\2.jpg" '注:此处用image属性,不要用picture属性
End Sub
Private Sub Form_Load()
Picture1.AutoRedraw = True
Me.Picture1.Picture = LoadPicture("c:\1.jpg")
Picture1.Print "hello"
SavePicture Me.Picture1.Image, "c:\2.jpg" '注:此处用image属性,不要用picture属性
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
已经发邮箱了
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询