API Documentation > CorelDRAW > 2025-v26 > PatternFill > IVGPatternFill
PatternFill.FrontColor property
Gets or sets the FrontColor
Syntax:
Property Get FrontColor() As Color
Property Set FrontColor(ByVal Value As Color)
Remarks:
The FrontColor property returns or specifies the foreground color in a two-color bitmap pattern fill.
Examples:
The following VBA example creates a rectangle, applies a two-color bitmap pattern to it, and changes the foreground color to red.
Sub Test()
Dim s As Shape
Dim pf As PatternFill
Set s = ActiveLayer.CreateRectangle(0, 0, 2, 2)
Set pf = s.Fill.ApplyPatternFill(cdrTwoColorPattern, , 6)
pf.FrontColor.RGBAssign 255, 0, 0 
End Sub