Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sideways Label
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00799531
Message ID:
00799615
Vues:
20
Hi Kevin,

Use this; it assumes you have a PictureBox object on your form:

Dim MyText As String = "This is my text"
Dim textSize As SizeF
Dim g As Graphics
Dim myShadowBrush As Brush = Brushes.Gray
Dim myForeBrush As Brush = Brushes.Black
Dim myFont As New Font("Times New Roman", 40, FontStyle.Regular)
Dim xLocation, yLocation As Single ' Used for the location
g = Me.PictureBox1.CreateGraphics()
g.Clear(Color.White)
textSize = g.MeasureString(MyText, myFont)
xLocation = (Me.PictureBox1.Width - textSize.Width) / 2
yLocation = (Me.PictureBox1.Height - textSize.Height) / 2
g.RotateTransform(90)
g.DrawString(MyText, myFont, myForeBrush, 10, -100)

Les Pinter
Les Pinter
(650) 344-3969
Les@LesPinter.com for consulting bookings.
www.LesPinter.com.

Watch for my forthcoming book on "Developing Database Applications in VFP and VB.NET".
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform