Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleDraw hollow text
Keywordshollow text, text, path
CategoriesGraphics
 
Use the BeginPath and EndPath API functions to make a path. Use StrokePath to draw it.
 
Private Sub Form_Load()
Const TXT = "Hello!"

Dim i As Long
Dim hRgn As Long

    Picture1.AutoRedraw = True

    ' Select a big font.
    Picture1.Font.Name = "Times New Roman"
    Picture1.Font.Bold = True
    Picture1.Font.Size = 50

    ' Make the PictureBox big enough.
    Picture1.Width = Picture1.TextWidth(TXT)
    Picture1.Height = Picture1.TextHeight(TXT)

    ' Make the clipping path.
    BeginPath Picture1.hdc
    Picture1.CurrentX = 0
    Picture1.CurrentY = 0
    Picture1.Print TXT
    EndPath Picture1.hdc

    ' Draw the path.
    StrokePath Picture1.hdc
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated