View Single Post
 
Old October 8th, 2003, 10:53 AM
gbianchi gbianchi is offline
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

i made some test between instr and like..
but i get no diference between then :(

well.. i try this..

Code:
Option Explicit
Dim fso As FileSystemObject
Dim fDir As Folder
Dim fArch As File
Dim sTime As Date
Dim nTotal As Long
Dim nHits As Long
Dim i As Long
Private Sub CmdCheck1_Click()
    nTotal = 0
    nHits = 0
    sTime = Now
    For i = 1 To 50
        For Each fArch In fDir.Files
            nTotal = nTotal + 1
            If InStr(1, LCase(fArch.Name), "dll", vbTextCompare) > 0 Then
                nHits = nHits + 1
            End If
        Next fArch
    Next i
    TxtTiempo.Text = DateDiff("s", sTime, Now)
    TxtTotal = CStr(nHits) & " / " & CStr(nTotal)
End Sub

Private Sub Command1_Click()
    nTotal = 0
    nHits = 0
    sTime = Now
    For i = 1 To 50
        For Each fArch In fDir.Files
            nTotal = nTotal + 1
            If LCase(fArch.Name) Like "*dll*" Then
                nHits = nHits + 1
            End If
        Next fArch
    Next i
    TxtTiempo1.Text = DateDiff("s", sTime, Now)
    TxtTotal1.Text = CStr(nHits) & " / " & CStr(nTotal)
End Sub

Private Sub Form_Load()
    Set fso = New FileSystemObject
    Set fDir = fso.GetFolder("C:\WINNT\system32")
End Sub
i use two buttons and 4 textboxes for displaying reasons...

and instr return 190 and like 191... no real dif...

could somebody else try it to see what results it have??


Gonzalo Bianchi