Sub Globals
Dim buff(0) As byte
s=""
End Sub
Sub App_Start
path=AppPath&"\1.jpg"
bit.New1
FileOpen(c,path,cRandom)
Dim buff(FileSize(path)) As byte
bin.New1(c,True)
bin.ReadBytes(buff(),ArrayLen(buff()))
FileClose(c)
[COLOR=Red]Msgbox(ArrayLen(buff()))[/COLOR]
s=bin.BytesToString(buff(),0,ArrayLen(buff()))
[COLOR=Red]Msgbox(StrLength(s))[/COLOR]
button1_click
'textbox1.Text=s
'Form1.Show
End Sub
Sub Button1_Click
path=AppPath&"\test.jpg"
If FileExist(path) Then FileDel(path)
Dim buff(0) As byte
FileOpen(c,path,cRandom)
bin.New1(c,True)
buff()=bin.StringToBytes(s)
bin.WriteBytes(buff())
FileClose(c)
[COLOR=Red]Msgbox(ArrayLen(buff()))[/COLOR]
End Sub