我正在尝试使用以下代码保存列表视图框的内容
Dim W As IO.StreamWriter
Private Sub Button6_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim i As Integer
W = New IO.StreamWriter("c:\" & "sname" & ".txt")
For i = 0 To ListView1.Items.Count - 1
W.WriteLine(ListView1.Items(i))
Next
W.Close()
End Sub
当我尝试运行该应用程序时,它显示的代码如下:Access to the path 'c:\sname.txt' is denied.
任何帮助表示赞赏。