|
p; If Trim(LCase(.Item(i).SubItems(1))) = Trim(LCase(infoname)) Then
Check_OverLap = True
Exit Function
Else
Check_OverLap = False
End If
Next
End With
End Function
Private Sub cmdinfo_Click(Index As Integer)
Dim AddFileName() As String
Dim str As String
Dim Value As String
Dim i As Long
Dim j As Long
Dim selIndex() As Long
Select Case Index
Case 0 ''''清除列表
lstInfo.ListItems.Clear
EditLstvInfo lstInfo.SelectedItem ''''显示精选项
Case 1 ''''删除精选项
ReDim selIndex(0): Value = ""
For i = 1 To lstInfo.ListItems.count
If lstInfo.ListItems(i).Selected Then
ReDim Preserve selIndex(UBound(selIndex) + 1)
selIndex(UBound(selIndex)) = i
Value = Value & " " & i
End If
Next
Value = MsgBox("你将删除序号为“" & Trim(Value) & "”的信息!" & vbCrLf & "确定要删除吗?", vbQuestion + vbOKCancel, "警告")
If Value = vbCancel Then
Exit Sub
Else
Screen.MousePointer = 11
For i = UBound(selIndex) To 1 Step -1
lstInfo.ListItems.Remove selIndex(i)
Next
''''重新排序
j = lstInfo_sort
If j = 0 And lstInfo.ListItems.count <> 0 Then lstInfo.ListItems(lstInfo.ListItems.count).Selected = True
On Error Resume Next
lstInfo.SelectedItem.EnsureVisible
EditLstvInfo lstInfo.SelectedItem ''''显示精选项
If lstInfo.ListItems.count = 0 Then cmdinfo(2).Enabled = False: cmdinfo(1).Enabled = False
Screen.MousePointer = 1
End If
Case 2 ''''修改信息
If Not FileExists(Trim(txtEditInfo(0))) Then
MsgBox "源信息文件不存在!"
Exit Sub
End If
If Trim(txtEditInfo(1)) = "" Then
MsgBox "目标信息路径不能为空!"
Exit Sub
End If
If UCase(GetExt(Trim(txtEditInfo(1)))) <> UCase(GetExt(Trim(txtEditInfo(0)))) Then
MsgBox "目标信息文件扩展名不对!"
Exit Sub
End If
& 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >> 没有相关教程
|