dcsimg
Results 1 to 5 of 5
  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2015
    Posts
    393

    BitBlt part of a picturebox

    Hello experts
    I want to print a picturebox and BitBlt part of that picturebox.
    I found this code. i can BitBlt some areas in the picturebox but not what I need.
    Code:
    lonSrcX = 230
    lonSrcY = 20
    lonRasterOp = &HCC0020
       lonStatus = BitBlt&(picHidden.hDc, 250, 180, 200, 60, Picture1.hDc, lonSrcX, lonSrcY, lonRasterOp)
    Name:  pic.jpg
Views: 109
Size:  46.0 KB
    thank you for any help

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,353

    Re: BitBlt part of a picturebox

    Maybe be more specific by "but not what I need"?
    P.S. You can use VB's PaintPicture vs BitBlt when target & destination are VB object hDCs
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2015
    Posts
    393

    Re: BitBlt part of a picturebox

    Thank you LaVolpe for your interest
    Maybe be more specific by "but not what I need"?
    What I mean is that it is not BitBlting the area which I'm targeting.

  4. #4
    Fanatic Member
    Join Date
    Dec 2014
    Posts
    622

    Re: BitBlt part of a picturebox

    what about refresh and autoredraw?
    also, what is lonRasterOp? why not use vbSrcCopy?

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,353

    Re: BitBlt part of a picturebox

    Quote Originally Posted by newbie2 View Post
    Thank you LaVolpe for your interest

    What I mean is that it is not BitBlting the area which I'm targeting.
    As baka pointed out... If the source picbox is hidden or not visible on the screen, its AutoRedraw must be True.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width