davidrobin
Mar 19th, 2001, 06:19 PM
When using the arc API call how do I change the drawing color so I get different colour arcs?
Can someone also give me an example of the arc function being used.
Thanks, it would help me out a great deal.
You should be able to change the "ForeColor" Property of the surface you are drawing on.
Z.
Arcom
Mar 20th, 2001, 05:05 PM
Here's an example:
Private Declare Function Arc 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()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'Set graphical mode to persistent
Me.AutoRedraw = True
'Draw to arcs
Arc Me.hdc, 0, 0, 100, 100, 100, 50, 50, 100
Arc Me.hdc, 49, 49, 149, 149, 49, 99, 99, 49
End Sub
BTW: You can also change the drawing color by creating and selecting a new pen (via API).
Creating a Pen is the same thing as changing the "ForeColor" property, just wrapped up by VB.
Z.
Arcom
Mar 20th, 2001, 05:58 PM
Yes I know, but if you draw anything on a memory DC, then you can only use APIs