Ok I got it working thanx a lot but I have one other question. How can i bitblt so that when i copy the whole picturebox it copies all of the other and picture boxes that are inside of it?
Printable View
Ok I got it working thanx a lot but I have one other question. How can i bitblt so that when i copy the whole picturebox it copies all of the other and picture boxes that are inside of it?
first of all, set att picturebox property scalemode to 3 - pixels...
then dont use dest.Width/Height, use ScaleWidth/ScaleHeight
you should also set autoredraw to true, and after you've printed something into the picturebox, do dest.refresh
i've downloaded you working program, and i noticed that you're using Width/Height property...that's not good because the width/height are using twips instead of pixels which is aprox 15 times longer...
that means that instead of blitting a total of 209469 pixels, it's 47130525 pixels....and as you can see, thats 255 times more for the computer to process...
ok i understand that but can you tell me why the second one isn't working?
Cyborg...are you saying that if I have all my picture properites set at twips and I use .scalewidth/.scaleheight it wont working properly?Quote:
you're using Width/Height property...that's not good because the width/height are using twips instead of pixels which is aprox 15 times longer
yes, it will work, but there will be too much processing...
you see...
the picturebox is built in pixels, but you can scale that to twips which is about 15 times the pixel amount...
and because pixels are the smallest unit on the screen, you cant use units smaller than pixels....
so the FASTEST way is to set the ScaleMode to pixels so you have the correct scale, and when getting height/width properties, use scalewidth/scaleheight because they are correctly scaled to pixels, not twips..
i hope you understand this! it might be a bit confusing