CodeItBetter Programming Another VB Programming Blog

How to draw pie slices

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'Graphics - How to draw pie slices
'Use the API Pie function to draw pie slices

Option Explicit
 
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
Filed under: Graphics Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.