|
-
Jun 22nd, 2000, 07:49 AM
#1
Thread Starter
_______
using fso I can read a file into a textbox like soText1.Text = Input(LOF(1), 1)
if I want to read a complete text file
and store it in a var how is it done
in regular read vb looks for a #(FileNumber)
so it won't accept myVar = input(lof(Filenumber),myVar)
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 22nd, 2000, 07:55 AM
#2
transcendental analytic
Open your file with a filenumber first then
Code:
filenumber=freefile
Open yourfile for binary as filenumber
...your code
close filenumber
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 22nd, 2000, 08:01 AM
#3
Thread Starter
_______
doesn't accept this
input(lof(Filenumber),myVar)
how do I read the entire file inot myVar
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 22nd, 2000, 08:11 AM
#4
transcendental analytic
Hmmm, well you can do it this way
Code:
Property Get File(Filename As String) As String
Dim fnum As Byte
fnum = FreeFile
Open Filename For Binary As fnum
File = Space(LOF(fnum))
Get #fnum, , File
Close fnum
End Property
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 22nd, 2000, 08:12 AM
#5
Fanatic Member
Use the following function:
Code:
Open "C:\MyFile.txt" For Input As #1
Do Until EOF(1)
Line Input #1, tString
Text1.Text = Text1.Text & tString
Loop
Close #1
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|