home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / LVB / T2W32523.ZIP / _CMBLSB.FRM < prev    next >
Text File  |  1998-04-07  |  13KB  |  438 lines

  1. VERSION 5.00
  2. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  3. Begin VB.Form frmComboList 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Combo - List"
  6.    ClientHeight    =   5190
  7.    ClientLeft      =   1110
  8.    ClientTop       =   1365
  9.    ClientWidth     =   7830
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   5190
  14.    ScaleWidth      =   7830
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.ListBox List1 
  17.       Height          =   1815
  18.       Left            =   120
  19.       TabIndex        =   11
  20.       Top             =   2760
  21.       Width           =   7575
  22.    End
  23.    Begin VB.ComboBox Combo1 
  24.       Height          =   315
  25.       Left            =   120
  26.       TabIndex        =   10
  27.       Top             =   2280
  28.       Width           =   7575
  29.    End
  30.    Begin VB.TextBox txt_Result 
  31.       BackColor       =   &H00C0C0C0&
  32.       BorderStyle     =   0  'None
  33.       Height          =   1485
  34.       Left            =   120
  35.       Locked          =   -1  'True
  36.       MultiLine       =   -1  'True
  37.       ScrollBars      =   2  'Vertical
  38.       TabIndex        =   6
  39.       Top             =   600
  40.       Width           =   7575
  41.    End
  42.    Begin Threed.SSPanel SSPanel1 
  43.       Align           =   1  'Align Top
  44.       Height          =   480
  45.       Left            =   0
  46.       TabIndex        =   0
  47.       Top             =   0
  48.       Width           =   7830
  49.       _Version        =   65536
  50.       _ExtentX        =   13811
  51.       _ExtentY        =   847
  52.       _StockProps     =   15
  53.       ForeColor       =   -2147483640
  54.       BackColor       =   12632256
  55.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  56.          Name            =   "MS Sans Serif"
  57.          Size            =   8.25
  58.          Charset         =   0
  59.          Weight          =   400
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.       Begin VB.ComboBox cmb_Function 
  65.          Height          =   315
  66.          Left            =   1365
  67.          TabIndex        =   1
  68.          Top             =   90
  69.          Width           =   5145
  70.       End
  71.       Begin Threed.SSCommand cmdNP 
  72.          Height          =   300
  73.          Index           =   1
  74.          Left            =   7500
  75.          TabIndex        =   5
  76.          Top             =   90
  77.          Width           =   255
  78.          _Version        =   65536
  79.          _ExtentX        =   450
  80.          _ExtentY        =   529
  81.          _StockProps     =   78
  82.          Caption         =   ">"
  83.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  84.             Name            =   "MS Sans Serif"
  85.             Size            =   8.25
  86.             Charset         =   0
  87.             Weight          =   400
  88.             Underline       =   0   'False
  89.             Italic          =   0   'False
  90.             Strikethrough   =   0   'False
  91.          EndProperty
  92.          BevelWidth      =   1
  93.          Font3D          =   3
  94.          RoundedCorners  =   0   'False
  95.          Outline         =   0   'False
  96.       End
  97.       Begin Threed.SSCommand cmdNP 
  98.          Height          =   300
  99.          Index           =   0
  100.          Left            =   6660
  101.          TabIndex        =   4
  102.          Top             =   90
  103.          Width           =   255
  104.          _Version        =   65536
  105.          _ExtentX        =   450
  106.          _ExtentY        =   529
  107.          _StockProps     =   78
  108.          Caption         =   "<"
  109.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  110.             Name            =   "MS Sans Serif"
  111.             Size            =   8.25
  112.             Charset         =   0
  113.             Weight          =   400
  114.             Underline       =   0   'False
  115.             Italic          =   0   'False
  116.             Strikethrough   =   0   'False
  117.          EndProperty
  118.          BevelWidth      =   1
  119.          Font3D          =   3
  120.          RoundedCorners  =   0   'False
  121.          Outline         =   0   'False
  122.       End
  123.       Begin Threed.SSCommand SSCommand1 
  124.          Default         =   -1  'True
  125.          Height          =   300
  126.          Left            =   6975
  127.          TabIndex        =   2
  128.          Top             =   90
  129.          Width           =   465
  130.          _Version        =   65536
  131.          _ExtentX        =   820
  132.          _ExtentY        =   529
  133.          _StockProps     =   78
  134.          Caption         =   "&Go"
  135.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  136.             Name            =   "MS Sans Serif"
  137.             Size            =   8.25
  138.             Charset         =   0
  139.             Weight          =   400
  140.             Underline       =   0   'False
  141.             Italic          =   0   'False
  142.             Strikethrough   =   0   'False
  143.          EndProperty
  144.          BevelWidth      =   1
  145.          RoundedCorners  =   0   'False
  146.          Outline         =   0   'False
  147.       End
  148.       Begin VB.Label Label2 
  149.          Caption         =   "&Select a function"
  150.          Height          =   255
  151.          Left            =   90
  152.          TabIndex        =   3
  153.          Top             =   120
  154.          Width           =   1275
  155.       End
  156.    End
  157.    Begin Threed.SSPanel SSPanel2 
  158.       Align           =   2  'Align Bottom
  159.       Height          =   465
  160.       Left            =   0
  161.       TabIndex        =   7
  162.       Top             =   4725
  163.       Width           =   7830
  164.       _Version        =   65536
  165.       _ExtentX        =   13811
  166.       _ExtentY        =   820
  167.       _StockProps     =   15
  168.       BackColor       =   12632256
  169.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  170.          Name            =   "MS Sans Serif"
  171.          Size            =   8.25
  172.          Charset         =   0
  173.          Weight          =   400
  174.          Underline       =   0   'False
  175.          Italic          =   0   'False
  176.          Strikethrough   =   0   'False
  177.       EndProperty
  178.       Begin VB.TextBox Text1 
  179.          Height          =   285
  180.          Left            =   2040
  181.          TabIndex        =   8
  182.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  183.          Top             =   90
  184.          Width           =   4710
  185.       End
  186.       Begin Threed.SSCommand SSCommand2 
  187.          Height          =   285
  188.          Left            =   6900
  189.          TabIndex        =   12
  190.          Top             =   90
  191.          Width           =   825
  192.          _Version        =   65536
  193.          _ExtentX        =   1455
  194.          _ExtentY        =   503
  195.          _StockProps     =   78
  196.          Caption         =   "&Reset"
  197.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  198.             Name            =   "MS Sans Serif"
  199.             Size            =   8.25
  200.             Charset         =   0
  201.             Weight          =   400
  202.             Underline       =   0   'False
  203.             Italic          =   0   'False
  204.             Strikethrough   =   0   'False
  205.          EndProperty
  206.          BevelWidth      =   1
  207.          Outline         =   0   'False
  208.       End
  209.       Begin VB.Label Label1 
  210.          Caption         =   "&Enter a dir/file to search"
  211.          Height          =   255
  212.          Left            =   90
  213.          TabIndex        =   9
  214.          Top             =   120
  215.          Width           =   1875
  216.       End
  217.    End
  218. End
  219. Attribute VB_Name = "frmComboList"
  220. Attribute VB_GlobalNameSpace = False
  221. Attribute VB_Creatable = False
  222. Attribute VB_PredeclaredId = True
  223. Attribute VB_Exposed = False
  224. Option Explicit
  225. Option Base 1
  226.  
  227. Private Const Iteration = 1
  228.  
  229. Dim IsLoaded         As Integer
  230.  
  231. Dim TimerStartOk     As Integer
  232. Dim TimerCloseOk     As Integer
  233.  
  234. Dim TimerHandle      As Integer
  235. Dim TimerValue       As Long
  236.  
  237. Private Sub cmdNP_Click(Index As Integer)
  238.  
  239.    Text1.Text = ""
  240.    
  241.    Call sub_NextPrev(cmb_Function, Index)
  242.  
  243. End Sub
  244.  
  245.  
  246. Private Sub cmb_Function_Click()
  247.    
  248.    If (IsLoaded = False) Then Exit Sub
  249.    
  250.    Call cDisableFI(mdiT2W.Picture1)
  251.    
  252.    txt_Result = ""
  253.    
  254.    DoEvents
  255.    
  256.    Combo1.Clear
  257.    List1.Clear
  258.    
  259.    Select Case cmb_Function.ListIndex
  260.       Case 0
  261.          Call TestComboListDir
  262.       Case 1
  263.          Call TestComboListFile
  264.       Case 2
  265.          Call TestComboListFileAttrib
  266.    End Select
  267.    
  268.    DoEvents
  269.    Call cEnableFI(mdiT2W.Picture1)
  270.    
  271. End Sub
  272.  
  273.  
  274. Private Sub Form_Activate()
  275.  
  276.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  277.  
  278. End Sub
  279.  
  280. Private Sub Form_Load()
  281.  
  282.    IsLoaded = False
  283.    
  284.    Show
  285.  
  286.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_cmblst.t2w")
  287.    
  288.    IsLoaded = True
  289.    
  290. End Sub
  291.  
  292. Private Sub SSCommand1_Click()
  293.    
  294.    Call cmb_Function_Click
  295.    
  296. End Sub
  297.  
  298.  
  299. Private Sub TestComboListDir()
  300.  
  301.    Dim lResult          As Long
  302.    Dim strResult        As String
  303.    Dim strDisplay       As String
  304.    
  305.    Dim i                As Integer
  306.    
  307.    If (Text1.Text = "") Then Text1.Text = "?y*tem*"
  308.             
  309.    strResult = Text1.Text
  310.    
  311.    DoEvents
  312.    
  313.    strDisplay = strDisplay & "Search all directory occurences of '" & strResult & "' on drive C:" & vbCrLf & vbCrLf
  314.    strDisplay = strDisplay & "   number of dirs show in the ComboBox is '" & cComboSearchDir(Combo1.hWnd, "c:\", strResult) & "'" & vbCrLf & vbCrLf
  315.    strDisplay = strDisplay & "   number of dirs show in the ListBox is '" & cListSearchDir(List1.hWnd, "c:\", strResult) & "'" & vbCrLf & vbCrLf
  316.    
  317.    txt_Result = strDisplay
  318.  
  319.    If (List1.ListCount > 0) Then List1.ListIndex = 0
  320.    If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
  321.    
  322.    'time the function
  323.    
  324.    Combo1.Clear
  325.  
  326.    TimerHandle = cTimerOpen()
  327.    TimerStartOk = cTimerStart(TimerHandle)
  328.    
  329.    For i = 1 To Iteration
  330.       lResult = cComboSearchDir(Combo1.hWnd, "c:\", strResult)
  331.    Next i
  332.    
  333.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  334.    
  335.    TimerCloseOk = cTimerClose(TimerHandle)
  336.  
  337.    If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
  338.    
  339. End Sub
  340.  
  341. Private Sub SSCommand2_Click()
  342.  
  343.    Select Case cmb_Function.ListIndex
  344.       Case 0   'TestComboListDir
  345.          Text1.Text = "?y*tem*"
  346.       Case 1   'TestComboListFile
  347.          Text1.Text = "t?w*.d?l"
  348.    End Select
  349.    
  350. End Sub
  351.  
  352.  
  353.  
  354.  
  355. Private Sub TestComboListFile()
  356.  
  357.    Dim lResult          As Long
  358.    Dim strResult        As String
  359.    Dim strDisplay       As String
  360.    
  361.    Dim i                As Integer
  362.    
  363.    If (Text1.Text = "") Then Text1.Text = "t?w*.d?l"
  364.    
  365.    strResult = Text1.Text
  366.    
  367.    DoEvents
  368.    
  369.    strDisplay = strDisplay & "Search all file occurences of '" & strResult & "' on drive C:" & vbCrLf & vbCrLf
  370.    strDisplay = strDisplay & "   number of files show in the ComboBox is '" & cComboSearchFile(Combo1.hWnd, "c:\", strResult) & "'" & vbCrLf & vbCrLf
  371.    strDisplay = strDisplay & "   number of files show in the ListBox is '" & cListSearchFile(List1.hWnd, "c:\", strResult) & "'" & vbCrLf & vbCrLf
  372.    
  373.    txt_Result = strDisplay
  374.  
  375.    If (List1.ListCount > 0) Then List1.ListIndex = 0
  376.    If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
  377.    
  378.    'time the function
  379.    
  380.    Combo1.Clear
  381.  
  382.    TimerHandle = cTimerOpen()
  383.    TimerStartOk = cTimerStart(TimerHandle)
  384.    
  385.    For i = 1 To Iteration
  386.       lResult = cComboSearchFile(Combo1.hWnd, "c:\", strResult)
  387.    Next i
  388.    
  389.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  390.    
  391.    TimerCloseOk = cTimerClose(TimerHandle)
  392.  
  393.    If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
  394.    
  395. End Sub
  396.  
  397. Private Sub TestComboListFileAttrib()
  398.  
  399.    Dim lResult          As Long
  400.    Dim strResult        As String
  401.    Dim strDisplay       As String
  402.    
  403.    Dim i                As Integer
  404.    
  405.    If (Text1.Text = "") Then Text1.Text = "t?w*.d?l"
  406.    
  407.    strResult = Text1.Text
  408.    
  409.    DoEvents
  410.    
  411.    strDisplay = strDisplay & "Search all file occurences of '" & strResult & "' on drive C:" & vbCrLf & vbCrLf
  412.    strDisplay = strDisplay & "   number of files (Archive, Hidden) show in the ComboBox is '" & cComboSearchFileAttrib(Combo1.hWnd, "c:\", strResult, A_ARCHIVE Or A_HIDDEN) & "'" & vbCrLf & vbCrLf
  413.    strDisplay = strDisplay & "   number of files (Archive, Hidden) show in the ListBox is '" & cListSearchFileAttrib(List1.hWnd, "c:\", strResult, A_ARCHIVE Or A_HIDDEN) & "'" & vbCrLf & vbCrLf
  414.    
  415.    txt_Result = strDisplay
  416.  
  417.    If (List1.ListCount > 0) Then List1.ListIndex = 0
  418.    If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
  419.    
  420.    'time the function
  421.    
  422.    Combo1.Clear
  423.  
  424.    TimerHandle = cTimerOpen()
  425.    TimerStartOk = cTimerStart(TimerHandle)
  426.    
  427.    For i = 1 To Iteration
  428.       lResult = cComboSearchFileAttrib(Combo1.hWnd, "c:\", strResult, A_ARCHIVE Or A_HIDDEN)
  429.    Next i
  430.    
  431.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  432.    
  433.    TimerCloseOk = cTimerClose(TimerHandle)
  434.  
  435.    If (Combo1.ListCount > 0) Then Combo1.ListIndex = 0
  436.    
  437. End Sub
  438.