constants StateChangeEnum
Specifies the new state of the control. Use the StateChange event to notify your application when the control's state is changed.

NameValueDescription
RenameState0 Fired when a file is renamed. This notification is not fired if an outside process change or renames a file in the current view. This notification is sent only if the file is renamed inside the current control.
SetFocusState1 The control gains the focus. 
KillFocusState2 The control loses the focus.
SelChangeState3 Fired when the control's selection is changed. Use the Get method to collect the selected files/folders.
BrowseChangeState4 Occurs when the control browses a new folder. The BrowseFolderPath property indicates the folder being browsed.
RefreshState5 Notifies the application once the Refresh method is invoked.
UpdateChangeState6 Fired when the browsed folder suffers a change ( like an outside process renamed, deleted or added a file ). 
BeforeFilterChangeState7 Fired just before starting filtering the files. This notifies your application once the control starts filtering files and folders based on the UI actions.
AfterFilterChangeState8 Fired after control has filtered the files. This notifies your application once the control starts filtering files and folders based on the UI actions.
BeforeLoadState9 Notifies the application once the control starts loading the objects ( the name of the objects ).
AfterLoadState10 Notifies the application once the control ends loading the objects ( the name of the objects ). Even if this state is fired, the control still can look for information about current files or folders until the ReadyState is sent. 
BeforeExpandFolderState11 Notifies the application once a folder is expanding. Use this notification to do your work before expanding an item. 
AfterExpandFolderState12 Notifies the application once a folder is expanded. Use this notification to do your work after an item is expanded. 
BeforeCollapseFolderState13 Notifies the application once a folder is collapsing. Use this notification to do your work before collapsing an item. 
AfterCollapseFolderState14 Notifies the application once a folder is collapsed. Use this notification to do your work after an item is collapsed. 
CheckStateChange15 Fired when the object's checkbox is changed.
BusyState16 The BusyState event occurs once the control starts collecting information for current files and folders. This event notifies your application once the control start loading information about  This state may occurs only if the Asynchronous property is set on true.
ReadyState17 The ReadState event occurs once the control ends collecting information for current files and folders. This event notifies that the control is ready, in other words, all information about current view is loaded. This state may occurs only if the Asynchronous property is set on true.
StartFromToState18 Occurs when the control starts applying the From/To format.
EndFromToState19 Occurs when the control ends applying the From/To format.
ShowContextMenu20 Occurs when the control is about to display the object's context menu. The ShowContextMenu property indicates the items to be displayed on the object's context menu. The ShowContextMenu property has effect only during the StateChange event, when the State parameter is ShowContextMenu. The ShowContextMenu property can be used to disable, update, remove or add new items. The AllowMenuContext property specifies whether the control shows the object's context menu when the user presses the right click over a file or folder.
ExecuteContextMenu21 Occurs when the control is about to execute a command from the object's context menu. The event occurs before executing the command selected from the context menu. The ExecuteContextMenu property specifies the identifier of the command to be executed ( id option in the ShowContextMenu property). The ExecuteContextMenu property has effect only during the StateChange event, when the State parameter is ExecuteContextMenu. The AllowMenuContext property specifies whether the control shows the object's context menu when the user presses the right click over a file or folder.
LoadingState22 The LoadingState event occurs several time while the control loads files or folders.

The following VB sample enumerates the selected items:

Private Sub ExFileView1_StateChange(ByVal State As EXFILEVIEWLibCtl.StateChangeEnum)
    If State = SelChangeState Then
        Dim fs As Files, f As File
        Set fs = ExFileView1.Get(SelItems)
        For Each f In fs
            Debug.Print f.Name
        Next
    End If
End Sub

The following C++ sample enumerates the selected items:

void OnStateChangeExfileview1(long State) 
{
	switch ( State )
	{
		case 0: /*StartSearching*/
		{
			OutputDebugString( "Start searching" );
			break;
		}
		case 1: /*EndSearching*/
		{
			OutputDebugString( "End searching" );
			break;
		}
	}
}

The following VB.NET sample enumerates the selected items:

Private Sub AxExFileView1_StateChange(ByVal sender As Object, ByVal e As AxEXFILEVIEWLib._IExFileViewEvents_StateChangeEvent) Handles AxExFileView1.StateChange
    Select Case e.state
        Case EXFILEVIEWLib.StateChangeEnum.SelChangeState
            With AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems)
                Dim i As Integer
                For i = 0 To .Count - 1
                    With .Item(i)
                        Debug.WriteLine(.Name)
                    End With
                Next
            End With
    End Select
End Sub

The following C# sample enumerates the selected items:

private void axExFileView1_StateChange(object sender, AxEXFILEVIEWLib._IExFileViewEvents_StateChangeEvent e)
{
	switch (e.state)
	{
		case EXFILEVIEWLib.StateChangeEnum.SelChangeState:
		{
			EXFILEVIEWLib.Files files = axExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems);
			for (int i = 0; i < files.Count; i++)
			{
				EXFILEVIEWLib.File file = files[i];
				System.Diagnostics.Debug.WriteLine(file.Name);
			}
			break;
		}
	}
}

The following VFP sample enumerates the selected items:

*** ActiveX Control Event ***
LPARAMETERS state

do case 

 case state = 3 && SelChangeState
 with thisform.ExFileView1.Get( 0 ) && SelItems
 	local i
 	for i = 0 to .Count - 1
		with .Item(i)
			wait window nowait .Name
		endwith 		
 	next
 endwith	
 
endcase