VERSION 5.00 Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX" Begin VB.Form frmOpen BorderStyle = 3 'Fixed Dialog Caption = "Open" ClientHeight = 4095 ClientLeft = 45 ClientTop = 330 ClientWidth = 4815 ControlBox = 0 'False KeyPreview = -1 'True LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 4095 ScaleWidth = 4815 ShowInTaskbar = 0 'False StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdOK Caption = "OK" Height = 375 Left = 2160 TabIndex = 1 Top = 3600 Width = 1215 End Begin VB.CommandButton cmdCancel Cancel = -1 'True Caption = "Cancel" Height = 375 Left = 3480 TabIndex = 2 Top = 3600 Width = 1215 End Begin ComctlLib.ListView List Height = 2655 Left = 120 TabIndex = 4 Top = 480 Width = 4575 _ExtentX = 8070 _ExtentY = 4683 View = 3 LabelEdit = 1 MultiSelect = -1 'True LabelWrap = -1 'True HideSelection = -1 'True _Version = 327682 ForeColor = -2147483640 BackColor = -2147483643 BorderStyle = 1 Appearance = 1 NumItems = 0 End Begin VB.TextBox OpenItem Height = 285 Left = 120 TabIndex = 0 Top = 3240 Width = 4575 End Begin VB.TextBox Obj Alignment = 2 'Center Height = 285 Left = 1320 TabIndex = 3 Top = 120 Width = 2175 End End Attribute VB_Name = "frmOpen" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Public OK As Boolean Private Sub Form_Activate() Obj.Text = vbNullString List.ListItems.Clear OpenItem.Text = vbNullString OpenItem.SetFocus End Sub Private Sub Form_Load() List.ColumnHeaders.Add , , "Name", List.Width * 0.6, lvwColumnLeft List.ColumnHeaders.Add , , "Size", List.Width * 0.08, lvwColumnRight List.ColumnHeaders.Add , , "Type", List.Width * 0.08, lvwColumnLeft List.View = lvwReport End Sub Private Sub List_ColumnClick(ByVal ColumnHeader As ComctlLib.ColumnHeader) List.Sorted = True If List.SortKey <> ColumnHeader.Index - 1 Or List.SortOrder = lvwDescending Then List.SortOrder = lvwAscending Else List.SortOrder = lvwDescending End If List.SortKey = ColumnHeader.Index - 1 End Sub Private Sub List_ItemClick(ByVal Item As ComctlLib.ListItem) Dim i As ComctlLib.ListItem t = "" For Each i In List.ListItems If i.Selected Then n = i.Text If InStr(i, " ") <> 0 Then n = Left$(n, InStr(i, " ")) n = i.Tag & StripChars(n, "*") t = t & " " & n End If Next OpenItem.Text = Mid$(t, 2) End Sub Private Sub cmdOK_Click() OK = True Me.Hide End Sub Private Sub cmdCancel_Click() OK = False Me.Hide End Sub Private Sub List_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then OpenItem.SetFocus cmdOK_Click End If End Sub Private Sub Obj_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Dim Reply As String Dim li As ListItem Obj.Enabled = False List.Enabled = False List.ListItems.Clear Forms(1).SendLine "VERBS " & Obj.Text Reply = Forms(1).ReadReply If Not Forms(1).isOK(Reply) Then MsgBox Reply Else Reply = Forms(1).ReadData Reply = Left$(Reply, Len(Reply) - 3) Set Result = Lines(Reply) For Each i In Result Set W = Words(i) n = Mid$(i, 2, InStr(2, i, """") - 2) l = W.Item(W.Count) Set li = List.ListItems.Add(, , n) li.SubItems(1) = RightJust(CStr(l), 5) li.SubItems(2) = "Verb" li.Tag = Obj.Text & ":" Next End If Forms(1).SendLine "PROPS " & Obj.Text Reply = Forms(1).ReadReply If Not Forms(1).isOK(Reply) Then MsgBox Reply Else Reply = Forms(1).ReadData Reply = Left$(Reply, Len(Reply) - 3) Set Result = Lines(Reply) For Each i In Result Set W = Words(i) n = Mid$(i, 2, InStr(2, i, """") - 2) l = W.Item(W.Count) Set li = List.ListItems.Add(, , n) li.SubItems(1) = RightJust(CStr(l), 5) li.SubItems(2) = "Prop" li.Tag = Obj.Text & "." Next End If Obj.Enabled = True List.Enabled = True List.SetFocus End If End Sub Private Sub OpenItem_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If InStr(OpenItem.Text, ":") = 0 And InStr(OpenItem.Text, ".") = 0 Then Obj.Text = OpenItem.Text Obj.SetFocus Obj_KeyPress (KeyAscii) Else cmdOK_Click End If End If End Sub