Using Binary.dll... how to?

Discussion in 'Questions (Windows Mobile)' started by Rod, Aug 14, 2007.

  1. Rod

    Rod Member

    I'm having trouble. How can i add a reference to BinaryFile.dll and then create an object of this type?
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Rod

    Rod Member

    Thanks. Now it works... or at least compiles. But the data.dat file doesn't saver the files. :S
    Don't know why. The code i have as follows:

    Sub Globals

    End Sub

    Sub App_Start
    End Sub

    Sub Button1_Click
    End Sub

    Sub Encajar_Click
       bin.EmbedFile (AppPath & TextBox2.Text)
       bin.EmbedFile (AppPath & 
    End Sub

    Sub Button4_Click
    End Sub
    Any ideas?
  4. Rod

    Rod Member

    how can i creat I bin file then that contains a series of images?

  5. Erel

    Erel Administrator Staff Member Licensed User

    You're code seems right except of this line:
    bin.EmbedFile (AppPath & TextBox2.Text)

    You should probably change it to:
    bin.EmbedFile (AppPath & "\" & TextBox2.Text)
  6. Rod

    Rod Member



    I did ti, thanks. Now I can embed files in to a data.dat. Now the thing is, i have a series of images in the same data.dat. How can i retrieve them? I don't think this do the job:
    Form1.Image = bin.RetrieveImage

    Thanks again tho
    Last edited: Aug 15, 2007
  7. Erel

    Erel Administrator Staff Member Licensed User

    I'm not sure what you want to achieve but this is what your code does:
    Form1.Image = bin.RetrieveImage 'Makes the first image to be the background
    Form1.DrawImage(bin.RetrieveImage,10,10) 'Draws the second image on the form at 10,10.

    Note that you can use the ImageLib library for more drawing options.
  8. Rod

    Rod Member

    Last edited: Aug 15, 2007
  9. alexeew

    alexeew Member

    This don't work with ImageButton

    ImageButton1.Image = bin.RetrieveImage

    Why ?

    That work!!!
    Image1.Image = bin.RetrieveImage
    ImageButton1.Image = Image1.Image
    Last edited: Dec 16, 2007
  10. alfcen

    alfcen Well-Known Member Licensed User

    Hello Alex

    In order to minimize memory load the Image Button just references to an image. It is best to retrieve images from a binary file into an ImageList control and assign images to Image Buttons, such as

    For i= 0 To x

    ImageButton1.Image = ImageList1.Item(x)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice