We help IT Professionals succeed at work.

How to Take a screenshot of Webbrowser1 in Visual Basic 6?

SDfatha
SDfatha asked
on
Is there any code in visual basic 6 that allows you to take a screenshot of the webbrowser1 control? Thanks!
Comment
Watch Question

Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I didn't write the code in the attached application but you can use its code using CaptureWindow to take a picture of any window using it's handle.

Capture.zip
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009
Commented:
Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
While the code I posted is a nice little app, it doesn't actually work in this case because I just discovered that the Webbrowser control doesn't have an hwnd:( It could be figured out I assume, but Idle_Mind's link looks like a good solution.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.