I am currently using the following method to open raster files from a form:
Public Function BrowseRaster(ByVal sTitle As String, ByRef sFolder As String, ByRef sName As String) As Boolean
Dim pGxDialog As IGxDialog = New GxDialog
Dim pRasterFilter As IGxObjectFilter = New GxFilterRasterDatasets()
Dim pFilterCol As IGxObjectFilterCollection
Dim pEnumGx As IEnumGxObject
Dim pGxObject As IGxObject
sFolder = ""
sName = ""
pFilterCol = pGxDialog
pFilterCol.AddFilter(pRasterFilter, True)
'pGxDialog.StartingLocation = ""
pGxDialog.RememberLocation = True
pGxDialog.AllowMultiSelect = False
pGxDialog.Title = sTitle
If pGxDialog.DoModalOpen(0, pEnumGx) Then
pGxObject = pEnumGx.Next
Dim sFile As New FileInfo(pGxObject.FullName)
'sName = pGxObject.BaseName
sName = pGxObject.Name
sFolder = sFile.Directory.FullName
Return True
End If
End Function
How can I modify this function to also open files from inside of a file geodatabase?