RE: [VB.Net] Making a cool File/Directory Search 04-04-2013, 11:00 PM
#29
Private Sub ListView1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDoubleClick
Dim OpenThis As String
Dim SelectedPath As Object
Dim PathConverted As Converter(Of Object, String)
SelectedPath = Me.ListView1.CheckedItems(Path.Text)
PathConverted = SelectedPath
OpenThis = "C:\" & SelectedPath
FileOpen(Access:=OpenAccess.Default, FileName:=OpenThis, FileNumber:=Nothing, Mode:=OpenMode.Append, RecordLength:=Nothing, Share:=Nothing)
End Sub
Above is my activation code and everything goes smooth until it reads the file name. I did notice that when it displays the path on my pc it leaves out the C:\ so I added it to the code and I still get the same error. "Bad file name or File Number." Any ideas???? Thanks again for all the help!
Dim OpenThis As String
Dim SelectedPath As Object
Dim PathConverted As Converter(Of Object, String)
SelectedPath = Me.ListView1.CheckedItems(Path.Text)
PathConverted = SelectedPath
OpenThis = "C:\" & SelectedPath
FileOpen(Access:=OpenAccess.Default, FileName:=OpenThis, FileNumber:=Nothing, Mode:=OpenMode.Append, RecordLength:=Nothing, Share:=Nothing)
End Sub
Above is my activation code and everything goes smooth until it reads the file name. I did notice that when it displays the path on my pc it leaves out the C:\ so I added it to the code and I still get the same error. "Bad file name or File Number." Any ideas???? Thanks again for all the help!


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)