VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Pie Graph Generator

Trevor Newsome  (1 Submission)   Graphics   Visual Basic 3.0   Advanced   Wed 3rd February 2021

To create a pie chart for reporting by adding a number of segments with the relevant data.

Assumes
There is a complete project demonstrating how to use the class Pie chart so even the beginner should be able to use this. All code it well commented.

API Declarations
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 Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long
Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long

Rate Pie Graph Generator (9(9 Vote))

Download Pie Graph Generator

Pie Graph Generator Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters