Nevím, jak je to ve VB6 ale ve VB.NET můžete napsat text přímo do obrázku (teď nevm, jestli je to dobře ale nějak tak to je):
Dim grp As Drawing.Graphics
Dim Bitmap As New Drawing.Bitmap(PictureBox1.Width, PictureBox1.Height)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
grp = Graphics.FromImage(Bitmap)
grp.DrawImage(System.Drawing.Graphics.FromImage("C:\i.jpg"), 0, 0)
End Sub
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawImage(Bitmap, 0, 0)
End Sub
Sub VaseMetodaKdePiseteText(text As String)
Dim mujfont As New System.Drawing.Font("Arial", 15, Drawing.FontStyle.Regular, Drawing.GraphicsUnit.Pixel)
grp.DrawString(text, mujfont, System.Drawing.Brushes.White, 0, 0)
End Sub
A jen tak. VB.NET je lepší :-).
|