QueSTioN FoR THe eXPeRTs : can this be done??? 
Author Message
 QueSTioN FoR THe eXPeRTs : can this be done???

i want to save a file containing 2 pictures, 3 strings, 2 long integers.  I
also want to be able to retrive the information later.  how do  ido this???
Otherwise, i basically need to know how to store the following type into a
file:

type FileType
    int1 as long
    int2 as long
    ipic as image (or picture, etc...i dont know)
    ipic2 as image
    txt1 as string * 20
    txt2 as string *10
    txt3 as string*1
end type



Tue, 15 Jan 2002 03:00:00 GMT  
 QueSTioN FoR THe eXPeRTs : can this be done???
Of course it can be done, as usual when working with VB.

I would take the approach of using a single binary file, which is build up
with the various data parts.

Make Byte arrays of the pictures by saving the picture to a temp file, then
read back the contents as bytes into the array, and delete the temp file.

To restore, read the large file back, extract the byte array that represents
the picture, store this byte array to a temp file, and load the picturebox
from the temp file.

Other ways are possible too, for instance with creating/reading bitmaps.

John

SeRPaNT~ heeft geschreven in bericht

Quote:
>i want to save a file containing 2 pictures, 3 strings, 2 long integers.  I
>also want to be able to retrive the information later.  how do  ido this???
>Otherwise, i basically need to know how to store the following type into a
>file:

>type FileType
>    int1 as long
>    int2 as long
>    ipic as image (or picture, etc...i dont know)
>    ipic2 as image
>    txt1 as string * 20
>    txt2 as string *10
>    txt3 as string*1
>end type



Tue, 15 Jan 2002 03:00:00 GMT  
 QueSTioN FoR THe eXPeRTs : can this be done???
interesting,,,

but how do u do this?
could cum1 provide example code??


Quote:
> Of course it can be done, as usual when working with VB.

> I would take the approach of using a single binary file, which is build up
> with the various data parts.

> Make Byte arrays of the pictures by saving the picture to a temp file,
then
> read back the contents as bytes into the array, and delete the temp file.

> To restore, read the large file back, extract the byte array that
represents
> the picture, store this byte array to a temp file, and load the picturebox
> from the temp file.

> Other ways are possible too, for instance with creating/reading bitmaps.

> John

> SeRPaNT~ heeft geschreven in bericht

> >i want to save a file containing 2 pictures, 3 strings, 2 long integers.
I
> >also want to be able to retrive the information later.  how do  ido
this???
> >Otherwise, i basically need to know how to store the following type into
a
> >file:

> >type FileType
> >    int1 as long
> >    int2 as long
> >    ipic as image (or picture, etc...i dont know)
> >    ipic2 as image
> >    txt1 as string * 20
> >    txt2 as string *10
> >    txt3 as string*1
> >end type



Thu, 17 Jan 2002 03:00:00 GMT  
 QueSTioN FoR THe eXPeRTs : can this be done???
Instead of just giving you code, try yourself first. You'll probably can
come further than you think.

Look up Help for Open (as Binary), Get and Put, Loadpicture, SavePicture,
that should give you enough handles to get started.

If you encounter problems, you can always come back and ask the NG for
assistance.

John

SeRPaNT~ heeft geschreven in bericht

Quote:
>interesting,,,

>but how do u do this?
>could cum1 provide example code??



>> Of course it can be done, as usual when working with VB.

>> I would take the approach of using a single binary file, which is build
up
>> with the various data parts.

>> Make Byte arrays of the pictures by saving the picture to a temp file,
then
>> read back the contents as bytes into the array, and delete the temp file.

>> To restore, read the large file back, extract the byte array that
represents
>> the picture, store this byte array to a temp file, and load the
picturebox
>> from the temp file.

>> Other ways are possible too, for instance with creating/reading bitmaps.

>> John

>> SeRPaNT~ heeft geschreven in bericht

>> >i want to save a file containing 2 pictures, 3 strings, 2 long integers.
>I

<SNIP>


Thu, 17 Jan 2002 03:00:00 GMT  
 QueSTioN FoR THe eXPeRTs : can this be done???
Why don't you create and use an MS ACCESS type database with your VB
frontend??

You can save OLE Objects (Pictures, Images, Binary Video, Sound files, etc.)
in that database


Quote:
> i want to save a file containing 2 pictures, 3 strings, 2 long integers.
I
> also want to be able to retrive the information later.  how do  ido
this???
> Otherwise, i basically need to know how to store the following type into a
> file:

> type FileType
>     int1 as long
>     int2 as long
>     ipic as image (or picture, etc...i dont know)
>     ipic2 as image
>     txt1 as string * 20
>     txt2 as string *10
>     txt3 as string*1
> end type



Tue, 22 Jan 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. What am I doing wrong? (XSLT question)

2. Am I top Windows expert?

3. I am looking to hire an expert in Outlook 2000 programming

4. Recordset: What am I doing wrong?

5. What am I doing wrong??

6. What am I doing wrong?

7. Help with syntax. What am I doing wrong

8. What am I doing wrong?

9. What am I doing wrong?

10. What am I doing wrong?

11. Please tell me what I am doing wrong - DAO parameter Append Query :(

12. Can this be done or am I dreaming?

 

 
Powered by phpBB® Forum Software