Bonjour

J'ai bien réussi à écrire le texte sur une image nouvellement créée dynamiquement.
Ci joint le code:

J'ai mis toute les options sur le texte.
Mais je n'arrive pas à le mettre sur fond transparent
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
28
29
30
31
32
33
34
35
36
37
38
39
 
Private Sub CommandButton1_Click()
 
i = i + 1
 e = e + 100
    Set imageplus = Me.Controls.Add("forms.image.1")
    With imageplus
        .Name = "MonImage" & i
        .Left = e
        .Top = 30
        .Width = 200
        .Height = 60
    .BackColor = 123654
    .BackStyle = fmBackStyleTransparent
    .BorderStyle = fmBorderStyleNone
    a = .Width / 3.3
    End With
 
    MsgBox imageplus.Name & " ajouté dans l'UserForm."
Set o = New ClGdiPlus
o.DrawSmooth = True
' Creation bitmap
nom = "MonImage" & i
Call o.CreateBitmap(o.PointsToPixelsX(Me.Controls(nom).Width), o.PointsToPixelsY(Me.Controls(nom).Height))
' Fond blanc
o.FillColor vbWhite
' Crayon a l'interieur
'o.PenAlignMode = PenAlignmentInset
' Ajout des textures
o.TextureAddFromControl "filltext1", Me.ImgCiel
 
o.ImageListDel "text"
' Ecrit un texte
o.FillTexture = ""
o.FillTexture = "filltext1"
o.DrawText "montext", a, "Arial", 0, 0, o.ImageWidth - 2, o.ImageHeight, 1, , 0, 0, -1, 50, True, True, True, True, True
 
o.RepaintControl Me.Controls(nom)
End Sub
Si je ne me trompe pas le "-1 et 50 devrait être pour le fond transparent.

Mais ça ne fonctionne pas
Merci pour l'aide