Raphael Stuyck
Posts: 2
Joined: 2010-03-17
|
Hi,
I'm using a sideBar
I want to capture the content of the browser as image (only the website, no bar, no menu, nothing)
I've a code using Screen.PrimaryScreen
As I'm newbie, could you help ?
the function works fine, but takes a capture from the whole screen, and I just want the inner content from the active tab
In red, what I need to change
I already read all your forum and doc but it doesn't help me...
thx
raf
Private Sub grabscreen(ByVal myId As String)
red
PictureBox1.Image = Screenshot
Dim tmpFilePath As String = String.Empty
Try
If Me.pAPI IsNot Nothing Then
tmpFilePath = Me.pAPI.GetWriteableFolderPath()
PictureBox1.Image.Save(tmpFilePath & "\" & myId & ".bmp", System.Drawing.Imaging.ImageFormat.Bmp)
MessageBox.Show(tmpFilePath)
End If
Catch err As Exception
MessageBox.Show(err.Message)
If tmpFilePath <> String.Empty Then
If File.Exists(tmpFilePath) Then
File.Delete(tmpFilePath)
End If
End If
End Try
End Sub |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Hi Raphael,
You can try using GetWindowRect (its a Win32 API function) to get the rectangle. Try using ADXIEModule.MainWindowHandle or ADXIEModule.ParentWindowHandle and pass the corresponding hwnd to that function.
Andrei Smolin
Add-in Express Team Leader |
|