The SafeFileName property is only supported in the 3.0 framework and higher. You can confirm that by reviewing the documentation here. This means (since you are targetting the .NET 2.0 framework) that you can't use it. I believe there is a problem with there being two different versions of the v2.0 System.Windows.Forms library.
You can use, and should use this to get your file name (the SafeFileName property calls this internally anyway):
Code:Dim safeFileName As String = IO.Path.GetFileName(fullPath)




Reply With Quote