Udostępnij za pośrednictwem


Printer.FillColor Property

Gets or sets the color that is used to fill in shapes created by using the Circle and Line graphics methods.

Namespace:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
Public Property FillColor As Integer
    Get
    Set
public int FillColor { get; set; }
public:
property int FillColor {
    int get ();
    void set (int value);
}
member FillColor : int with get, set
function get FillColor () : int
function set FillColor (value : int)

Property Value

Type: System.Int32
Returns an Integer.

Remarks

When the FillStyle property is set to its default (transparent), the FillColor setting is ignored. If no FillColor is specified, FillColor defaults to black.

Note

You can convert any .NET Framework Color or SystemColors color value to a FillColor value by calling the ToArgb function:

Printer.FillColor = System.Drawing.Color.Violet.ToArgb

The following table lists the ColorConstants and SystemColorConstants values that are valid for the FillColor property.

Constant

Value

.NET Framework equivalent

vbBlack

&h00

Black

vbRed

&hFF

Red

vbGreen

&hFF00

Green

vbYellow

&hFFFF

Yellow

vbBlue

&hFF0000

Blue

vbMagenta

&hFF00FF

Magenta

vbCyan

&hFFFF00

Cyan

vbWhite

&hFFFFFF

White

vbScrollBars

&H80000000

ScrollBar

vbDesktop

&H80000001

Desktop

vbActiveTitleBar

&H80000002

ActiveCaption

vbInactiveTitleBar

&H80000003

InactiveCaption

vbMenuBar

&H80000004

Menu

vbWindowBackground

&H80000005

Window

vbWindowFrame

&H80000006

WindowFrame

vbMenuText

&H80000007

MenuText

vbWindowText

&H80000008

WindowText

vbTitleBarText

&H80000009

ActiveCaptionText

vbActiveBorder

&H8000000A

ActiveBorder

vbInactiveBorder

&H8000000B

InactiveBorder

vbApplicationWorkspace

&H8000000C

AppWorkSpace()

vbHighlight

&H8000000D

Highlight

vbHighlightText

&H8000000E

HighlightText

vbButtonFace

&H8000000F

ButtonFace

vbButtonShadow

&H80000010

ControlDark

vbGrayText

&H80000011

GrayText

vbButtonText

&H80000012

ControlText

vbInactiveCaptionText

&H80000013

InactiveCaptionText

vb3DHighlight

&H80000014

ControlLightLight

vb3DDKShadow

&H80000015

ControlDarkDark

vb3DLight

&H80000016

ControlLight

vb3DFace

&H8000000F

ControlDark

vb3Dshadow

&H80000010

ControlDarkDark

vbInfoText

&H80000017

InfoText

vbInfoBackground

&H80000018

Info

Note

Functions and objects in the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2010. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Examples

The following example demonstrates how to set the FillColor property to print a filled red circle.

Dim pr As New Printer
pr.FillStyle = vbFSSolid
pr.FillColor = vbRed
pr.Circle(2000, 2000, 1000)
pr.EndDoc()

.NET Framework Security

See Also

Reference

Printer Class

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace

Other Resources

Printer Compatibility Library

How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)

Deploying Applications That Reference the Printer Compatibility Library