Gets or sets an IColorFormat interface that represents the specified fill foreground color.
[Visual Basic] Property ForeColor As IColorFormat [C#] IColorFormat ForeColor { get; set; } [C++] __property IColorFormat* get_ForeColor(); __property void set_ForeColor(IColorFormat* ); [JScript] function get ForeColor() : IColorFormat function set ForeColor(IColorFormat);
IColorFormat interface.
This example creates a comment on cell B2 with pink background
[C#]
IRange range = book.Worksheets[1].Range["B2"];
IComment comment = range.AddComment("Comment text");
comment.Shape.Fill.Visible = true;
comment.Shape.Fill.Solid();
comment.Shape.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(0xF0F0FF);
[Visual Basic]
Dim range As IRange = book.Worksheets(1).Range("B2")
Dim comment As IComment = range.AddComment("Comment text")
comment.Shape.Fill.Visible = True
comment.Shape.Fill.Solid()
comment.Shape.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(&HF0F0FF)
[C++]
IRange* range = book->Worksheets->Item[1]->Range->Item[S"B2"];
IComment* comment = range->AddComment(S"Comment text");
comment->Shape->Fill->Visible = true;
comment->Shape->Fill->Solid();
comment->Shape->Fill->ForeColor->RGB = System::Drawing::Color::FromArgb(0xF0F0FF);
IFillFormat Interface | NativeExcel Namespace | IColorFormat interface | BackColor property