I'm trying to know how to save a content of a TextField to a File, like a .txt, using a Common Dialog, only a command dialog in Visual Basic 6, i need this using a only a common dialog, because i'm trying to do the same aplication in eVB, and eVB does not support this methods:
我试图知道如何将TextField的内容保存到文件,如.txt,使用通用对话框,只有Visual Basic 6中的命令对话框,我需要使用一个只有一个公共对话框,因为我'我试图在eVB中做同样的应用程序,而eVB不支持这种方法:
Dim objFSO As New Scripting.FileSystemObject
Dim objStream As Scripting.TextStream
Please help me, i'm needing this so much! Thanks.
请帮助我,我需要这么多!谢谢。
2 个解决方案
#1
Dim fileHandle As File
Set fileHandle = CreateObject("FILECTL.File")
fileHandle.Open "filename.txt", 2
fileHandle.LinePrint "some text"
fileHandle.Close
Set fileHandle = Nothing
#2
I am not familiar with eVB, but does it support legacy style file operations like this:
我不熟悉eVB,但它是否支持这样的传统样式文件操作:
Open "filename.txt" for output as #1
Print #1, yourtextfield.text
Close #1
#1
Dim fileHandle As File
Set fileHandle = CreateObject("FILECTL.File")
fileHandle.Open "filename.txt", 2
fileHandle.LinePrint "some text"
fileHandle.Close
Set fileHandle = Nothing
#2
I am not familiar with eVB, but does it support legacy style file operations like this:
我不熟悉eVB,但它是否支持这样的传统样式文件操作:
Open "filename.txt" for output as #1
Print #1, yourtextfield.text
Close #1