
Originally Posted by
Edgemeal
Maybe you could upload demo of your code, but just some quick thoughts,...
If Picbox.AutoRedraw=True then call Picbox.Refesh after the BitBlt call.
If Picbox.AutoRedraw=False then do not call Picbox.Refesh after the BitBlt call.
The xSrc and ySrc in BitBlt are the source capture points, so xSrc must be < the source width and ySrc < source height.
using these sub i can copy a container image with it controls(by image way):
Code:
Public Sub ImageWithControls(ByRef srcPicture As Long, ByRef dstPicture As Long)
PrintWindow srcPicture, dstPicture, 0
End Sub
ok how my code works:
Code:
picGraphicsEffects.Picture = UserControl.Image ' coopy the uc image to picgraphicseffects picturebox(until here fine)
UserControl.Picture = Nothing
Load PicAnimation(PicAnimation.Count) 'then i create 1 picturebox fox put the container image
ImageWithControls Extender.Container.hwnd, PicAnimation(PicAnimation.Count - 1).hDC
PicAnimation(PicAnimation.Count - 1).Picture = PicAnimation(PicAnimation.Count - 1).Image ' unti here works fine
Load PicAnimation(PicAnimation.Count)
Debug.Print BitBlt(PicAnimation(PicAnimation.Count - 1).hDC, 0, 0, UserControl.Width, UserControl.Height, PicAnimation(PicAnimation.Count - 2).hDC, Extender.Left, Extender.Top, SRCCOPY) ' i use these line for crop the image. i only need the usercontrol position and it's size(for crop the image). but here is the problem. is like isn't working or ignored:(
i don't understand why these bug(i know by seing
see the image result.. the problem is the girl background image, isn't correct, like you can see by container