Finds an item given its path.


| Type | Description | |||
| Path as String | A string expression that indicates the item's path. | |||
| HITEM | A long expression that indicates the item's handle that matches the criteria. |
The following VB sample selects the item based on its path:
ComboBox1.Items.SelectItem(ComboBox1.Items.FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")) = True
The following C++ sample selects the item based on its path:
#include "Items.h" CItems items = m_combobox.GetItems(); COleVariant vtMissing; long hFind = items.GetFindPath( "Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder" ); if ( hFind != NULL ) items.SetSelectItem( hFind, TRUE );
The following VB.NET sample selects the item based on its path:
With AxComboBox1.Items
Dim iFind As Integer
iFind = .FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")
If Not (iFind = 0) Then
.SelectItem(iFind) = True
End If
End With
The following C# sample selects the item based on its path:
int iFind = axComboBox1.Items.get_FindPath("Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder");
if ( iFind != 0 )
axComboBox1.Items.set_SelectItem(iFind, true);
The following VFP sample selects the item based on its path:
with thisform.ComboBox1.Items
.DefaultItem = .FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")
if ( .DefaultItem <> 0 )
.SelectItem( 0 ) = .t.
endif
endwith