Private Sub Report_Page()
Me.DrawWidth = 300
Me.Circle (25, 25), 1000, 255
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Const conPI = 3.14159265359
Dim sngHCtr As Single, sngVCtr As Single
Dim sngRadius As Single
Dim sngStart As Single, sngEnd As Single
sngHCtr = Me.ScaleWidth / 2 ' Horizontal center.
sngVCtr = Me.ScaleHeight / 2 ' Vertical center.
sngRadius = Me.ScaleHeight / 3 ' Circle radius.
' Draw circle.
Me.Circle(sngHCtr, sngVCtr), sngRadius
sngStart = -0.00000001 ' Start of pie slice.
sngEnd = -2 * conPI / 3 ' End of pie slice.
Me.FillColor = RGB(255,0,0) ' Color pie slice red.
Me.FillStyle = 0 ' Fill pie slice.
' Draw pie slice within circle.
Me.Circle(sngHCtr, sngVCtr), sngRadius, , sngStart, sngEnd
End Sub
试试上面的代码,看看效果!
[此贴子已经被作者于2006-10-20 8:34:48编辑过]
|