Results 1 to 2 of 2

Thread: Specifying file locations and loading files..

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Posts
    28

    Specifying file locations and loading files..

    how do i get a program that i've written/writing to save files it creates in a specific location, and how can i get the program to load files it as already created?

  2. #2
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    you can use the StreamReader as StreamWritter classes for reading and writing to files they are in sytem.io

    heres an example of how to use them

    VB Code:
    1. dim write as new streamwriter(application.StartupPath & "\test.txt")
    2. write.writeline("test writing to file")
    3. write.close
    4.  
    5. dim read as new streamreader(application.statupPath & "\test.txt")
    6. dim readInfo as string
    7. readInfo = read.readline
    8. read.close

    be shure to import system.io at the top or use the classes full names

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width