Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim FILE_NAME As String = "C:\KVRequest.txt"
Dim aryText(4) As String
aryText(0) = "TextBox4.Text"
aryText(1) = "TextBox5.Text"
aryText(2) = "TextBox6.Text"
aryText(3) = "TextBox7.Text"
aryText(4) = "TextBox8.Text"
Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)
objWriter.Close()
MsgBox("Text file created in your C drive, attach this file in an email to someone@gmail.com Please check that all of the details are correct before sending.")
End Sub
我要做的是从文本框(4 5 6 7 8)中获取文本以写入文本文件。我的代码创建了文件,但没有在其中写入文本,谁能给我一个关于如何让它工作的提示?
谢谢!
编辑:另外,当我在这里时,我试图得到它,所以 button_1.enabled 只有在所有文本框都已被编辑时才为真,但如果你能帮助我,我想不出一种实用的方法来做到这一点这个我也很感激!