Draw A Chord (Closed Arc)

The code below will draw a chord on your form.

Preparations

Add 1 Command Button to your Form.

Module Code

Declare Function Chord Lib "gdi32.dll" (ByVal hdc As Long, ByVal _
nLeftRect As Long, ByVal nTopRect As Long, ByVal nRightRect As _
Long, ByVal nBottomRect As Long, ByVal nXRadial1 As Long, ByVal _
nYRadial1 As Long, ByVal nXRadial2 As Long, ByVal nYRadial2 As Long) As Long

Form Code

Private Sub Command1_Click()
    retval = Chord(Form1.hdc, 10, 20, 210, 120, 210, 70, 110, 20)
End Sub

Go Back