liljegren
asked on
Something wrong with Input #
I'm trying to load a file into a textbox, but the file doesn't look like I want (as in Notepad). Here is my code:
iFile = FreeFile
Open sPath$ For Input As iFile%
Do Until EOF(iFile%)
Input #iFile%, sText$
sReturn$ = sReturn$ & sText$ & Chr(13) & Chr(10)
Loop
Close #iFile%
First, all the indentations disappears (i.e. space characters). This app is about source code, so I really need the indentations. How can I transfer them to a standard textbox in VB?
Second, the comma character (ASCII 44) convert into a carriage return/linefeed sequence! Why? What can I do about it?
Regards, Gustaf Liljegren
iFile = FreeFile
Open sPath$ For Input As iFile%
Do Until EOF(iFile%)
Input #iFile%, sText$
sReturn$ = sReturn$ & sText$ & Chr(13) & Chr(10)
Loop
Close #iFile%
First, all the indentations disappears (i.e. space characters). This app is about source code, so I really need the indentations. How can I transfer them to a standard textbox in VB?
Second, the comma character (ASCII 44) convert into a carriage return/linefeed sequence! Why? What can I do about it?
Regards, Gustaf Liljegren
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER