Dim pic As WinForm.PictureBox = e.Sender
If Tables("文件管理").Current Is Nothing Then
e.File = ProjectPath & "images/other.png"
return
End If
Dim wjm As String = Tables("文件管理").Current("文件")
If wjm.Contains(".") = False Then '若文件名不包含.,说明是未知文件
e.File = ProjectPath & "images/other.png"
Else
Dim i As Integer = wjm.LastIndexOf(".")
Dim kzm As String = wjm.SubString(i+1)
Dim kzms As String = "swf accdb mdb psd png xls xlsx bmp rar jpg doc docx zip pdf txt ppt exe" '定义已知扩展名
If kzms.Contains(kzm) = True Then
e.file = ProjectPath & "images/" & kzm & ".png"
Else
e.File = ProjectPath & "images/other.png"
End If
End If