Hello, I'm trying to write a code by working off of a source I've been looking at, but I really have no idea what I'm doing. I would appreciate it if somebody could help me correct my code and possibly explain to me why it was not working and answer the questions i have posted in the code, or just refer me to a tutorial that could help me, Thank you .

My code is:
Code:
Dim strjpg as string
Dim strjpgcode as string
Dim strsize as string
Dim strtarget as string
strsize = 20480       'what is this for? why is it significant?
strjpg = Text1.Text  
Open strjpg For Binary As #1
strjpgcode = Input$(LOF(1), 1)  'what is LOF(1),1) ?
strcount = Mid(strjpgcode, 1, strsize) 
Close #1
Open strtarget For Output As #1
        Print #1, strcount
      Close #1
End Sub
This is supposed to take a jpg and then insert the hex into another jpg file with nothing in it, and basically make it the same. But for some reason (i think it has to do with the strsize) the target picture is missing it's bottom half. Thanks for any help!