Bonjours,

comment faire pour centrer du text ? ma solution ne marche pas :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
Dim DrawFont As New Font("Arial", 12, FontStyle.Bold)
Dim DrawBrush As New SolidBrush(Color.Black)
 
e.Graphics.DrawString("CouCou", DrawFont, DrawBrush, Width\2, Height\2)