我创建了一个带有两个复选框和一个按钮的表单。我添加了这段代码
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Bg1.txt As String = "C:\Users\Josh\Documents\Bg1.txt"
Dim objReader As New System.IO.StreamReader(Bg1.txt)
TextBox1.Text = objReader.ReadToEnd
objReader.Close()
End Sub
End Class
按钮认为它会在单击时打开 Bg1.txt 但它不起作用?有任何想法吗?