Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Paintpicture to image

Hi! :WAVE:
I want to cut a part of an image and the copy it to a image control.
I cant get this to work... :confused:

Heres the code:

Private Sub Command1_Click()
Picture1.PaintPicture Image1, 0, 0, 48, 48, 1, 1, 48, 48, vbSrcCopy
Image2.Picture = Picture1.Picture
End Sub
[314 byte] By [jojo] at [2007-11-11 8:48:13]
# 1 Re: Paintpicture to image
You might try changing the second line to:

Set Image2.Picture = Picture1.Picture
Phil Weber at 2007-11-11 17:24:56 >
# 2 Re: Paintpicture to image
Thanks for your'e reply!
But it still want work?? I cant get no copty to then Image controll...
jojo at 2007-11-11 17:26:07 >
# 3 Re: Paintpicture to image
A shot in the dark... but maybe

Set Image2.Picture = Picture1.Image
edburdo at 2007-11-11 17:27:08 >
# 4 Re: Paintpicture to image
YES, YES, YES !!!
Thanks a lot :)
jojo at 2007-11-11 17:28:02 >