Использую код вида...
- Код: Выделить всё
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Const SRCCOPY = &HCC0020
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Form_Load()
Me.Show
Dim A1 As Long
Dim hHost As Long
hHost = FindWindow("TfrmClock", vbNullString)
A1 = GetDC(hHost)
Picture1.AutoRedraw = True
BitBlt Picture1.hDC, 0, 0, Screen.Width, Screen.Height, A1, 0, 0, SRCCOPY
End Sub
Но почему-то все время получаю скриншот текущего экрана. В чем тут моя ошибка? Подскажите, если не трудно.