Shell "File Not Found"
-
I have searched Google and the message boards but I can't find an answer to this.
strFileName = My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\\" & Me.dgvData.SelectedRows(0).Cells(0).Value.ToString & ".kml" Dim sw As StreamWriter = New StreamWriter(strFileName) sw.WriteLine(strXML) sw.Close() strFileName = Chr(34) & strFileName & Chr(34) procID = Shell(strFileName, AppWinStyle.NormalFocus)
As soon as it hits Shell if stops with file not found, yet the file exists as it has just been created. As you can see I tried enclosing the file name with "", but that has not helped either. I am assuming that since a kml file extension is registered to Google Earth that I don't need to specify GE. The file runs just fine if I find it in My Documents and double click it. Anyone out there who can help? :) :)
-
I have searched Google and the message boards but I can't find an answer to this.
strFileName = My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\\" & Me.dgvData.SelectedRows(0).Cells(0).Value.ToString & ".kml" Dim sw As StreamWriter = New StreamWriter(strFileName) sw.WriteLine(strXML) sw.Close() strFileName = Chr(34) & strFileName & Chr(34) procID = Shell(strFileName, AppWinStyle.NormalFocus)
As soon as it hits Shell if stops with file not found, yet the file exists as it has just been created. As you can see I tried enclosing the file name with "", but that has not helped either. I am assuming that since a kml file extension is registered to Google Earth that I don't need to specify GE. The file runs just fine if I find it in My Documents and double click it. Anyone out there who can help? :) :)
Thanks Folks. Question answered in the "How do I..." about the screen saver. Process.start works just fine.