|
-
Jun 16th, 2000, 06:02 PM
#1
Thread Starter
Junior Member
Umm can some1 pls translate this, or explain it more: this is wat RoyceWindsor1 wrote in relpy 2 my last post, i think it was called "i need help"
"If you're making a game with a board, you probably just want one image control with a picture of the board in it. Make another image control with the pictures of the markers in it. Finally, use the function to copy the markers onto the board as you need them. "
k i don't know wat BitBlt function is.
n i don't understand bout putting pictures of the markers in it.
sorry i'm not that great @ VB atm
so yeh....
can some 1 pls try n explain it
thanx
-
Jun 17th, 2000, 03:09 AM
#2
go here to see a bitblt demo
http://foxmccloud.tsx.org
what he means is make an image control, or pic box. with the picture of the board.
make sure you know the coordinates of where the spaces are.
and then bitblt the player pieces onto the board.
but like I said you will have to know the coordinates of where the board spaces are.. I usually do this by having something like a command button, I dont need it, I just place the top/left corner of it to the top/left corner of where i need something bitblt'd then it gives me the coordinates, after I am done getting all of the coordinates, I delete the command button..
and make sure to have the scale mode set to 3 - pixels.. for ALL controls, including, the form, all picboxes.. all containers... etc.
this goes in a module.
Code:
Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
put this in a command button, have 2 picboxes on the form, have one larger than the other. and have pictures in them both, set the smaller ones autoredraw property to true, make sure both of the boxes scalemode are set to pixels
make Picture1 the BIG picbox, make Picture2 the SMALL picbox(set #2's autoredraw property to true)
Code:
Call BitBlt Picture1.hdc, 0, 0, Picture1.Width, Picture1.Height, Picture1.hdc, 0, 0, vbSrcCopy
you should have a pretty copy of picture2 onto picture1's 0,0 (top/left corner) coordinate..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|