PDA

Click to See Complete Forum and Search --> : Open and save binary files????


Jhd.Honza
Jan 20th, 2000, 09:40 PM
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

Bart
Jan 21st, 2000, 03:15 PM
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