Image capture

Catalin Lungu lcatalin at siadv.com
Wed Jan 5 16:23:50 CET 2005


Hi,
Can anybody help me to implement the following VB code in Python. Thanks in 
advance.

Private Declare Function SendMessage Lib "user32.dll" 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&
Private Const PRF_CHILDREN = &H10&
Private Const PRF_OWNED = &H20&

Private Sub Command1_Click()
   SendMessage grid.hwnd, WM_PAINT, picture.hDC, 0
   SendMessage grid.hwnd, WM_PRINT, picture.hDC, PRF_CHILDREN Or PRF_CLIENT
Or PRF_OWNED
   picture.Picture = picture.Image
   picture.Refresh
End Sub


Catalin
lcatalin at siadv.com 





More information about the Python-list mailing list