Capturar imagen del portapapeles i ponerla en un textbox!

deyvyd
30 de Marzo del 2004
como capturar una imagen del portapapeles i ponerla en un picturebox??? Gracias...

CESAR NAVA SOTO
30 de Marzo del 2004
Con el metodo GetData del objeto ClipBoard. Ejemplo:

Picture1.Picture = Clipboard.GetData

Jose Oscar
30 de Marzo del 2004
Okey, ahora bien yo pinto un picturebox (metodo line). como guardo esa imagen como "imagen.BMP"
Si alguien lo sabe se lo agradesco desde ya.

un saludo
Jose Oscar

deyvyd
30 de Marzo del 2004
La sintaxi para guardar esa imagen es la siguiente...

SavePicture Picture1.Picture, "c: ola.bmp"

Buki
30 de Marzo del 2004
Private Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long

Private Const WM_PAINT = &HF
Private Const WM_PRINT = &H317
Private Const PRF_CLIENT = &H4& ' Draw the window's client area
Private Const PRF_CHILDREN = &H10& ' Draw all visible child
Private Const PRF_OWNED = &H20& ' Draw all owned windows

Private Sub Command2_Click()
Dim rv As Long
Picture1.SetFocus ' So that the button doesn't look pressed
Picture2.AutoRedraw = True
rv = SendMessage(Picture1.hwnd, WM_PAINT, Picture2.hDc, 0)
rv = SendMessage(Picture1.hwnd, WM_PRINT, Picture2.hDc, _
PRF_CHILDREN + PRF_CLIENT + PRF_OWNED)
Picture2.Picture = Picture2.Image
Picture2.AutoRedraw = False
Command2.SetFocus ' Return Focus
End Sub