Hello,
Is there a way to add drop shadow to text in VB.NET?
Printable View
Hello,
Is there a way to add drop shadow to text in VB.NET?
i should probably write a aritcle on this..
here is the code
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
Dim g As Graphics = e.Graphics
g.DrawString("Kovan", New Font("Arial", 40), New SolidBrush(Color.Gray), 55, 55) 'SHADOW
g.DrawString("Kovan", New Font("Arial", 40), New SolidBrush(Color.Black), 50, 50) 'ORIGINAL TEXT
End Sub
How would I call this using a button click event?
2 ways.
1. put a boolean check in the paint which you set from the button
2. use a picture box instead of the actual form, and use method 1 with it.
.DrawString() requires PaintEventArgs e,:
so you can use anything that has PaintEventArgs
You may like to take a look at this site too.
http://www.bobpowell.net/dropshadowtext.htm