Share via


IOleComponent.OnEnterState Method

Notifies the component when the application enters or exits the specified state.

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

Syntax

'Declaration
Sub OnEnterState ( _
    uStateID As UInteger, _
    fEnter As Integer _
)
void OnEnterState(
    uint uStateID,
    int fEnter
)
void OnEnterState(
    [InAttribute] unsigned int uStateID, 
    [InAttribute] int fEnter
)
abstract OnEnterState : 
        uStateID:uint32 * 
        fEnter:int -> unit 
function OnEnterState(
    uStateID : uint, 
    fEnter : int
)

Parameters

  • fEnter
    Type: System.Int32
    true if the application is entering the state, false if it is exiting the state.

Remarks

The component should take action depending on value of uStateID.

If a given number of calls are made with true fEnter, the component should consider the state to be in effect until the same number of calls are made with false fEnter.

It is possible for this method to be called with false fEnter more times than it was called with true fEnter. For example, if you are maintaining a state counter (incremented when this method is called with true fEnter, decremented when called with false fEnter), the counter should not be decremented for false fEnter if it is already at zero.

.NET Framework Security

See Also

Reference

IOleComponent Interface

Microsoft.VisualStudio.OLE.Interop Namespace