Hi all
I hope this one is not too obvious, but I cannot see how to select the image to retrieve from a BinaryFile. My code just gets each image in sequence but I want to be able to go forwards and backwards and get images based on the position in the file.
My code is
Sub App_Start
'FileOpen(c1,"data.dat",cRandom)
'bin.New1(c1,true)
'bin.EmbedFile (AppPath & "\build.jpg")
'bin.EmbedFile (AppPath & "\wall.jpg")
'bin.EmbedFile (AppPath & "\garden.jpg")
'FileClose(c1)
Form1.Show
FileOpen(c1,"data.dat",cRandom)
bin.New1(c1,true)
'this get the first image in the sequence
Image1.Image = bin.RetrieveImage
End Sub
Sub Num1_ValueChanged
'and then this gets the next but how do I get a specific image
'or get a previous image?
Image1.Image = bin.RetrieveImage
End Sub
Sub Form1_Close
FileClose(c1)
End Sub
Any ideas?
Thanks - Bats
I hope this one is not too obvious, but I cannot see how to select the image to retrieve from a BinaryFile. My code just gets each image in sequence but I want to be able to go forwards and backwards and get images based on the position in the file.
My code is
Sub App_Start
'FileOpen(c1,"data.dat",cRandom)
'bin.New1(c1,true)
'bin.EmbedFile (AppPath & "\build.jpg")
'bin.EmbedFile (AppPath & "\wall.jpg")
'bin.EmbedFile (AppPath & "\garden.jpg")
'FileClose(c1)
Form1.Show
FileOpen(c1,"data.dat",cRandom)
bin.New1(c1,true)
'this get the first image in the sequence
Image1.Image = bin.RetrieveImage
End Sub
Sub Num1_ValueChanged
'and then this gets the next but how do I get a specific image
'or get a previous image?
Image1.Image = bin.RetrieveImage
End Sub
Sub Form1_Close
FileClose(c1)
End Sub
Any ideas?
Thanks - Bats