PDA

Click to See Complete Forum and Search --> : form transition and BitBlt problem


wengang
Mar 6th, 2002, 12:43 AM
hi all.
I'm using BitBlt to copy a piece of Form2 to a picture box control in form2 in the Form_Load event.

The problem is that the program begins with Form1 and no matter what I do, the Bitblt keeps copying its source from those coordinates on Form1

Form2 is not yet visible, but I've even done form2.show and form1.visible = false to make it use form2, also I used as Source DC
SourceDC = GetWindowDC(Form2.hwnd)

What more can I do?

I am using vbSrcCopy. Is that the problem?

ANybody?
thanks

Jotaf98
Mar 6th, 2002, 04:59 AM
Heh that's weird, can you post the code here so I have a look at it?

wengang
Mar 6th, 2002, 07:24 AM
never mind. I've moved past that now.

But this is what I'm stuck on. I used BitBlt to get the image onto the Picture box. Now I want to save the image that is now in the picturebox as a bitmap.

When I use SavePicture on the .picture , it saves the picture that was originally in picture1, not what I BitBlt to the box. So how can I either:

Save what is now painted into picture1 as a bitmap
or
make this bitblt picture in the picturebox become the .picture for this box.

either?

Thanks
Gary

wengang
Mar 6th, 2002, 07:31 AM
Never mind on that too.

Picture1.Image, not Picture1.Picture

Okay, let me get some more work done before I post a problem again