I am trying to take a screenshot of a website that has some .swf objects on it using PrintWindow API like this:
But it only shows me black empty screen. This code works fine on websites with no flash content. I know this might happen with DirectX or OpenGL but what does that have to do with SWF loaded into a web browser? Or Flash is using one of upper mentioned technologies to render its content? Any ways to bypass that?
PHP Code:
Private Declare Function PrintWindow Lib "user32" (ByVal hWnd As Long, ByVal hdcBlt As Long, ByVal nFlags As Long) As Long
Private Sub Command3_Click()
Dim lHwnd As Long
lHwnd = getHwndOfTheWindowOfBrowser();
Me.AutoRedraw = True
Me.Picture = Nothing
PrintWindow lHwnd, Me.hDC, 0
End Sub