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
| PUBLIC FUNCTION ecritTexte(hPict AS Picture, sText AS STRING) AS Picture 'écriture du nombre de mail sur l'icône du tray
DIM iSizeFont AS INTEGER = 14 DIM hImg AS Image DIM iCouleurBackground AS INTEGER = Color.Background DIM iAlign AS INTEGER = Align.Center
hImg = NEW Image(48, 48, iCouleurBackground) hImg = hPict.Image WITH Draw .Begin(hImg) .Foreground = Color.Red .Transparent = TRUE .Font = Font["DejaVu Sans,Regular," & iSizeFont] .Text(sText, 0, 10, 32, 16, iAlign) .End END WITH hPict = NULL sText = NULL RETURN hImg.Picture
CATCH Message.Title = ("Horreur!") Message(gb.CrLf & ("Une erreur : ") & Error.Text & gb.CrLf & "Code : " & Error.Code & gb.CrLf & "ecritTexte")
END
|