|
-
Mar 19th, 2001, 07:19 PM
#1
Thread Starter
Fanatic Member
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.
-
Mar 20th, 2001, 12:45 AM
#2
You should be able to change the "ForeColor" Property of the surface you are drawing on.
Z.
-
Mar 20th, 2001, 06:05 PM
#3
Addicted Member
Here's an example:
Code:
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: [email protected]
'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).
-
Mar 20th, 2001, 06:55 PM
#4
Creating a Pen is the same thing as changing the "ForeColor" property, just wrapped up by VB.
Z.
-
Mar 20th, 2001, 06:58 PM
#5
Addicted Member
Yes I know, but if you draw anything on a memory DC, then you can only use APIs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|