D
dgk
I'm trying to save the image of a webbrowser control. Not a particular
image being shown on the page, but rather the visible display of the
webbrowser. Using VS2005 I figured that maybe DrawToBitmap would work,
but it appears that the webbrowser doesn't implement it.
So I looked around and found that this code:
Dim g As Graphics
g.CopyFromScreen(Me.wb1.PointToScreen(New Point(0, 0)), New
Point(0, 0), wb1.Size)
should get the image into a graphics object. What I can't figure out
is how to get that into a bitmap that I can hang on to. This:
dim b as Bitmap = g.???
doesn't appear to be the correct approach; at least nothing works.
Is there some way to do this or am I going about it wrong? I can use
SnagIt or even PrintScreen to dump it into the clipboard so there must
be some way to get at it. Any help greatly appreciated.
image being shown on the page, but rather the visible display of the
webbrowser. Using VS2005 I figured that maybe DrawToBitmap would work,
but it appears that the webbrowser doesn't implement it.
So I looked around and found that this code:
Dim g As Graphics
g.CopyFromScreen(Me.wb1.PointToScreen(New Point(0, 0)), New
Point(0, 0), wb1.Size)
should get the image into a graphics object. What I can't figure out
is how to get that into a bitmap that I can hang on to. This:
dim b as Bitmap = g.???
doesn't appear to be the correct approach; at least nothing works.
Is there some way to do this or am I going about it wrong? I can use
SnagIt or even PrintScreen to dump it into the clipboard so there must
be some way to get at it. Any help greatly appreciated.