2012年12月18日 星期二

textbox轉txt文字檔


Imports system.io

Dim path As String = "c:\test.doc"
Dim fs As filestream
If file.exists(path) = False Then
fs = file.create(path)
Dim info As Byte() = New UTF8Encoding(True).GetBytes(me.textbox1.text)
fs.write(info, 0, info.length)
fs.close()
End If

沒有留言:

張貼留言