View Full Version: handling files in VB

C++ Learning Community > Other Programing Languages > handling files in VB


Title: handling files in VB
Description: FSO with Random access


Counterhack - October 25, 2003 02:43 AM (GMT)
I'm a C++ man, but I want to know some VB too

my question is: can you use the FileSystemObject and Random Access on the same file?

I created a txt file using the FSO object and tryed to write to it with the Random Access, but it won't work. does the FSO support binary and sequential files? can I create txt file with FSO and write to it using random access? what am I doing wrong?

please tell me how it is done if it can be with some examples to use as references
thanks in advance

shellcreatives - November 5, 2003 07:23 AM (GMT)
The FSO does support binary, but you need special methods.
That being said, don't bother.
Use the standard VB6 open method.
Open "path to file" For BINARY As #1
BinaryDump=Input(LOF(1),#1)
Close #1




* Hosted for free by InvisionFree