Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleUse the API Pie function to draw pie slices
Keywordspie, pie slice
CategoriesAPI, Graphics
 
The only interesting thing here is to note that Visual Basic's normal drawing properties (DrawWidth, ForeColor, etc.) work with the Pie function (and most API drawing functions).
 
Private Declare Function Pie Lib "gdi32" (ByVal hdc As _
    Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As _
    Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As _
    Long, ByVal X4 As Long, ByVal Y4 As Long) As Long

Private Sub Form_Load()
    AutoRedraw = True
    ScaleMode = vbPixels

    DrawWidth = 3
    ForeColor = vbRed
    FillColor = vbBlue
    FillStyle = vbDiagonalCross
    Pie hdc, 10, 10, ScaleWidth, ScaleHeight, _
        50, 0, 100, 100
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated