PDA

Click to See Complete Forum and Search --> : Bitblit


SeaHag
Aug 1st, 2002, 03:57 PM
Hi.
Questions concerning pictures.

What are the types of containers are uses as a source
to blit from (the obvious one is a picture box) ?

My problem is I want to make a sort of tile map.
its not really a map because there are no set objects

What i want to do is download pictures from the web
I want a 4pictures x 4pictures (pictures are 200x200 pix)
Ya know.. kinda construct a bigger picture.


And i want to buffer another row around those 4x4. so i can scroll.


How am i going to load my pics?

I can download and save do disk. But what from here.
Do i load all the pics into seperate picture boxes then blit them?

Or is there a way of assembling them befor i blit them

i have run across so many eg. osme to simple.. some way to complicated..

I have managed to get one of the eg working.. but i cannot figure where or what they do with the bitmay arrays.. ??

I will attach it.


Seahag

Fox
Aug 5th, 2002, 05:17 PM
Load 'em by code into the memory directly :)

Tutorial (http://fox.acky.net/vb/english/coding/tutorial/3.html) (Point 3.3)

SeaHag
Aug 6th, 2002, 07:30 AM
Thanks for your reply.

How many can i load into memory>?
I am thinking as many as i want.. ?
If so, how do i keep trak of them .. ?



Nifty

Seahag

Fox
Aug 6th, 2002, 08:19 PM
As many as your windows allows :-)

Well basically the function I show in the tutorial returns a 'pointer' to the DC so you'd use it like this:


Dim PicW as Long
Dim PicH as Long
Dim PicDC as Long

'Load picture
PicDC = LoadDC("c:\test.bmp", PicW, PicH)

'Show size
Msgbox "The picture is " & PicW & " x " & PicH & " pixels big."

'Use picture
BitBlt Me.hDC, 0, 0, PicW, PicH, PicDC, 0, 0, vbSrcCopy


See? Of course you can use PicDC(10) or any other array to store multiple DCs. If you need to store the size of each picture too, use a Type...

SeaHag
Aug 7th, 2002, 07:13 AM
I see..
Thanks for your help.
Its all so clear now.

Seahag