IVsStatusbar.Progress Method

Shows the progress of operations that take a determinate amount of time.

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

Syntax

‘선언
Function Progress ( _
    <OutAttribute> ByRef pdwCookie As UInteger, _
    fInProgress As Integer, _
    pwszLabel As String, _
    nComplete As UInteger, _
    nTotal As UInteger _
) As Integer
‘사용 방법
Dim instance As IVsStatusbar
Dim pdwCookie As UInteger
Dim fInProgress As Integer
Dim pwszLabel As String
Dim nComplete As UInteger
Dim nTotal As UInteger
Dim returnValue As Integer

returnValue = instance.Progress(pdwCookie, _
    fInProgress, pwszLabel, nComplete, _
    nTotal)
int Progress(
    out uint pdwCookie,
    int fInProgress,
    string pwszLabel,
    uint nComplete,
    uint nTotal
)
int Progress(
    [InAttribute] [OutAttribute] unsigned int% pdwCookie, 
    [InAttribute] int fInProgress, 
    [InAttribute] String^ pwszLabel, 
    [InAttribute] unsigned int nComplete, 
    [InAttribute] unsigned int nTotal
)
abstract Progress : 
        pdwCookie:uint32 byref * 
        fInProgress:int * 
        pwszLabel:string * 
        nComplete:uint32 * 
        nTotal:uint32 -> int 
function Progress(
    pdwCookie : uint, 
    fInProgress : int, 
    pwszLabel : String, 
    nComplete : uint, 
    nTotal : uint
) : int

Parameters

  • pdwCookie
    Type: System.UInt32%
    [in, out] ID of the current user, to prevent multiple uses of the progress bar at the same time.
  • fInProgress
    Type: System.Int32
    [in] true while the progress bar is in use; false when complete.
  • pwszLabel
    Type: System.String
    [in] Text to display in status field while the progress bar is in use.
  • nComplete
    Type: System.UInt32
    [in] Number of units currently complete in the progress bar.
  • nTotal
    Type: System.UInt32
    [in] Total number of units for the progress bar operation.

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::Progress(
   [in,out]VSCOOKIE *pdwCookie,
   [in]BOOL fInProgress,
   [in]LPCOLESTR pwszLabel,
   [in]ULONG nComplete,
   [in]ULONG nTotal
);

Progress is displayed as a growing blue bar in the progress bar area of the status bar. The first time a status bar user calls this method, pdwCookie must be set to zero. The value then returned in pdwCookie is the unique ID that that status bar user must use in future calls of this method.

This method is called to display the amount of progress being made during an operation. As such, nTotal must be known before you call this method. If nTotal cannot be ascertained beforehand and the operation is expected to take more than a couple of seconds, call the Animation method instead.

.NET Framework Security

See Also

Reference

IVsStatusbar Interface

IVsStatusbar Members

Microsoft.VisualStudio.Shell.Interop Namespace