Freigeben über


IVsStatusbar.Progress(UInt32, Int32, String, UInt32, UInt32) Method

Definition

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

public:
 int Progress([Runtime::InteropServices::Out] System::UInt32 % pdwCookie, int fInProgress, System::String ^ pwszLabel, System::UInt32 nComplete, System::UInt32 nTotal);
int Progress([Runtime::InteropServices::Out] unsigned int & pdwCookie, int fInProgress, std::wstring const & pwszLabel, unsigned int nComplete, unsigned int nTotal);
public int Progress (out uint pdwCookie, int fInProgress, string pwszLabel, uint nComplete, uint nTotal);
abstract member Progress : uint32 * int * string * uint32 * uint32 -> int
Public Function Progress (ByRef pdwCookie As UInteger, fInProgress As Integer, pwszLabel As String, nComplete As UInteger, nTotal As UInteger) As Integer

Parameters

pdwCookie
UInt32

[in, out] ID of the current user, to prevent multiple uses of the progress bar at the same time.

fInProgress
Int32

[in] true while the progress bar is in use; false when complete.

pwszLabel
String

[in] Text to display in status field while the progress bar is in use.

nComplete
UInt32

[in] Number of units currently complete in the progress bar.

nTotal
UInt32

[in] Total number of units for the progress bar operation.

Returns

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.

Applies to