How to Draw Hollow Text
Posted on January 5, 2009
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 | 'Graphics - How to Draw Hollow Text Option Explicit Declare Function BeginPath Lib "gdi32" (ByVal hdc As Long) As Long Declare Function EndPath Lib "gdi32" (ByVal hdc As Long) As Long Declare Function StrokePath Lib "gdi32" (ByVal hdc As Long) As Long 'Add a picture box control and set its AutoRedraw property to true Private Sub Form_Load() Const TXT = "http://codeitbetter.com/" Dim I As Long, hRgn As Long With Picture1 .Font.Name = "Courier New" .Font.Bold = True .Font.Size = 50 .Width = .TextWidth(TXT) .Height = .TextHeight(TXT) BeginPath .hdc .CurrentX = 0 .CurrentY = 0 .Print TXT EndPath .hdc StrokePath .hdc End With End Sub |