PDA

Click to See Complete Forum and Search --> : bitblt with control array


FireBeast
Apr 13th, 2000, 03:35 PM
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

Fox
Apr 13th, 2000, 05:42 PM
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:


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

FireBeast
Apr 13th, 2000, 08:56 PM
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