Results 1 to 5 of 5

Thread: [VB6] - PrintWindow() function

Threaded View

  1. #5

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,961

    Re: [VB6] - PrintWindow() function

    Quote Originally Posted by Edgemeal View Post
    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
    Attached Images Attached Images  
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width