If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
End Sub
Private Sub TestComboListFileAttrib()
Dim lResult As Long
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
If (Text1.Text = "") Then Text1.Text = "t?w*.d?l"
strResult = Text1.Text
DoEvents
strDisplay = strDisplay & "Search all file occurences of '" & strResult & "' on drive C:" & vbCrLf & vbCrLf
strDisplay = strDisplay & " number of files (Archive, Hidden) show in the ComboBox is '" & cComboSearchFileAttrib(Combo1.hwnd, "c:\", strResult, A_ARCHIVE Or A_HIDDEN) & "'" & vbCrLf & vbCrLf
strDisplay = strDisplay & " number of files (Archive, Hidden) show in the ListBox is '" & cListSearchFileAttrib(List1.hwnd, "c:\", strResult, A_ARCHIVE Or A_HIDDEN) & "'" & vbCrLf & vbCrLf
txt_Result = strDisplay
If (List1.ListCount > 0) Then List1.ListIndex = 0
If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
'time the function
Combo1.Clear
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
lResult = cComboSearchFileAttrib(Combo1.hwnd, "c:\", strResult, A_ARCHIVE Or A_HIDDEN)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0