Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

Take screenshot of website with swf on it

$
0
0
I am trying to take a screenshot of a website that has some .swf objects on it using PrintWindow API like this:

PHP Code:

Private Declare Function PrintWindow Lib "user32" (ByVal hWnd As LongByVal hdcBlt As LongByVal nFlags As Long) As Long

Private Sub Command3_Click()
   
Dim lHwnd As Long

   lHwnd 
getHwndOfTheWindowOfBrowser();
   
Me.AutoRedraw True
   Me
.Picture Nothing

   PrintWindow lHwnd
Me.hDC0

End Sub 

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?

Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>