This document is archived and information here might be outdated.  Recommended version.


IToolControl.OnFocus Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > SystemUI > ESRI.ArcGIS.SystemUI > Interfaces > IT > IToolControl Interface > IToolControl.OnFocus Method
ArcGIS Developer Help

IToolControl.OnFocus Method

Occurs when the control gains focus.

[Visual Basic .NET]
Public Sub OnFocus ( _
    ByVal complete As ICompletionNotify _
)
[C#]
public void OnFocus (
    ICompletionNotify complete
);
[C++]
HRESULT OnFocus(
  ICompletionNotify* complete
);
[C++]
Parameters
complete [in]

complete is a parameter of type ICompletionNotify*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

complete is a reference to a ICompletionNotify object. The ToolControl object uses this complete object to indicate when it's finished.

Remarks

When the ToolControl object gains focus, an ICompletionNotify object is passed to the ToolControl as the complete parameter in the OnFocus method. In your code in the OnFocus method, you would set a variable to the complete object.

The ToolControl needs to call the ICompletionNotify::SetComplete method when it's finished to let the application know that the control should lose focus.

See Also

IToolControl Interface | ICompletionNotify Interface