Поделиться через


IVsStatusbar.SetColorText Method

Sets the status bar text with foreground and background colors.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function SetColorText ( _
    pszText As String, _
    crForeColor As UInteger, _
    crBackColor As UInteger _
) As Integer
int SetColorText(
    string pszText,
    uint crForeColor,
    uint crBackColor
)
int SetColorText(
    [InAttribute] String^ pszText, 
    [InAttribute] unsigned int crForeColor, 
    [InAttribute] unsigned int crBackColor
)
abstract SetColorText : 
        pszText:string * 
        crForeColor:uint32 * 
        crBackColor:uint32 -> int 
function SetColorText(
    pszText : String, 
    crForeColor : uint, 
    crBackColor : uint
) : int

Parameters

  • pszText
    Type: System.String
    [in] The text to display in the status text area.
  • crForeColor
    Type: System.UInt32
    [in] The foreground color of pszText.
  • crBackColor
    Type: System.UInt32
    [in] The background color of pszText.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsStatusbar::SetColorText(
   [in]LPCOLESTR pszText,
   [in] COLORREF crForeColor,
   [in] COLORREF crBackColor
);

The method ignores the values of crForeColor and crBackColor and always sets the foreground color to white and the background color to dark blue.

.NET Framework Security

See Also

Reference

IVsStatusbar Interface

Microsoft.VisualStudio.Shell.Interop Namespace