Preview:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

	
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
        'Chargement de l'image
        Me.PictureBox1.Image = System.Drawing.Bitmap.FromFile("C:\Documents and Settings\Ludo\Bureau\Video Club\Jacquettes\hardcandy.jpg")
 
 
        'Définit un objet Graphics avec l'image de ton picturebox
        Dim ObjGraphics As Graphics = Graphics.FromImage(Me.PictureBox1.Image)
 
        'Définit le pinceau pour l'écriture 
        Dim brush As Brush = New SolidBrush(Color.Black)
 
 
        'Définit la police d'écriture avec la taille ainsi que le style (gras, italique...)
        Dim font As New Font("times new roman", 20, FontStyle.Bold)
 
        'Dessine le texte sur l'image à la position X de 10 et Y de 10
        ObjGraphics.DrawString(Me.TextBox1.Text, font, Brushes.Brown, 10, 10)
 
        'Libère les ressources
        ObjGraphics.Dispose()
 
        'Redessine l'image avec le texte
        Me.PictureBox1.Image = Me.PictureBox1.Image
 
    End Sub
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter