Results 1 to 3 of 3

Thread: bitblt with control array

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    14

    Unhappy

    Hi all,

    Can someone please tell me why this doesn't work?


    Private Sub Command1_Click()
    dim retval as long

    load picture2(1)
    picture2(1).visible = true

    retval=BitBlt(Me.Picture2(1).hDC, 0, 0, 100,100, me.Picture1.hDC, 10, 10, SRCCOPY)

    end sub

    .........
    I am trying to copy a section of picture1 to a newly loaded picture control.

    Thanks in advance

    FireBeast

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Just an idea...

    It's just an idea but maybe you have to run DoEvents after make it visible... or explicitely set it's AutoRedraw to False.. try this:

    Code:
    Private Sub Command1_Click() 
        Load Picture2(1) 
    
        Picture2(1).AutoRedraw = False
        Picture2(1).Visible = True 
    
        BitBlt Picture2(1).hDC, 0, 0, 100, 100, Picture1.hDC, 10, 10, VBSRCCOPY
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    14
    Thanks Fox,

    I've found that that the doevents works, but when I move the newly loaded picture on top of picture1 the content of the newly loaded picture disappeared.


    FireBeast

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