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
'宣告
Function SetColorText ( _
pszText As String, _
crForeColor As UInteger, _
crBackColor As UInteger _
) As Integer
'用途
Dim instance As IVsStatusbar
Dim pszText As String
Dim crForeColor As UInteger
Dim crBackColor As UInteger
Dim returnValue As Integer
returnValue = instance.SetColorText(pszText, _
crForeColor, crBackColor)
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.