Hello,
By double clicking on my Listbox1, I want to open the clicked file whose path is passed as a Listbox1.RowTagAt() parameter. I am not familiar with the “Folderitem.FromSaveInfo()” command that replaces the depreciated “FolderItem.GetRelative()” command.
I am inspired by an old source that displayed this:
Dim f As New FolderItem
launchFile = f.GetRelative(RowTag(ListIndex))
If launchFile <> Nil And launchFile.Exists Then
launchFile.Open()
End If
I tried to translate (unsuccessfully) into :
If Listbox1.RowCount >= 0 Then
Var path As String
Var launchFile As FolderItem
Var f As New FolderItem
//launchFile = f.FromSaveInfo(Me.RowTagAt(Me.SelectedRowIndex)) //for test
path = Listbox1.RowTagAt(Listbox1.SelectedRowIndex)
launchFile = f.FromSaveInfo(path) //return an folderitem
If launchFile <> Nil Then //launchFile always "nil" !
launchFile.Open
End If
End If
A little help will do me good. Thanks.