■55355 / inTopicNo.4) |
Re[2]: PictureBoxの画像にコメントを! |
□投稿者/ YAS (13回)-(2010/11/27(Sat) 21:24:09)
|
画像に文字列を書き込みたいのであれば,例えば,次のようになるかと思います。
Public Class Form1
Dim PictureBox1 As New PictureBox
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
Me.AutoSize = True
Me.PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize
Me.Controls.Add(PictureBox1)
Me.PictureBox1.Load("http://www.wankuma.com/images/logo3.png")
Using g As Graphics = Graphics.FromImage(Me.PictureBox1.Image)
g.DrawString("わんくま同盟", New Font(Me.Font.FontFamily, 20), Brushes.Red, New Point(0, 0))
End Using
Me.PictureBox1.Image.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\わんくま.jpg")
End Sub
End Class
|
|