Results 1 to 2 of 2

Thread: Open and save binary files????

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Post

    Hi! I have code like this:

    OPEN "image.ico" FOR BINARY AS #1
    OPEN "temp.ico" FOR BINARY AS #2
    temp = GET(#1,LOF(1))
    PUT #2,temp
    CLOSE

    but this adds some characters to temp.ico before the beginning of image.ico. It cannot be resolved by RIGHT or such statements. What shoud I do?




    ------------------
    Thanks,
    John, 14 years old

  2. #2
    Lively Member
    Join Date
    Oct 1999
    Posts
    66

    Post

    Try this:
    dim temp as string
    Open "image.ico" for binary as #1
    Open "temp.ico" for binary as #1
    temp = string(lof(1),chr(0))
    get #1,,temp
    put #2,,temp
    close #1
    close #2

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