Prev: converting ansi to utf8 format - is there anything wrong with it ? urgently requires help
Next: DragImageBits
From: Homer J Simpson on 8 Apr 2006 12:25 "dgk" <NoWhere(a)MailsAnonymous.com> wrote in message news:q4ef32tedskoev545kjo24omdnb4fl829u(a)4ax.com... > That was clever but it doesn't work; all I get is a white screen. I > then tried getting rid of the panel and using the form, but I get the > whole form with a big white space where the webbrowser is. I guess > that's why I was having so much trouble doing it straight; the > webbrowser image is sort of outside the scope of the project. > > It appears that this is not going to be trivial. Any other ideas? You are trying to simulate <CTRL>-<PRINT SCREEN> or <PRINT SCREEN> ??
From: dgk on 8 Apr 2006 16:35 On Sat, 08 Apr 2006 16:25:37 GMT, "Homer J Simpson" <nobody(a)nowhere.com> wrote: > >"dgk" <NoWhere(a)MailsAnonymous.com> wrote in message >news:q4ef32tedskoev545kjo24omdnb4fl829u(a)4ax.com... > >> That was clever but it doesn't work; all I get is a white screen. I >> then tried getting rid of the panel and using the form, but I get the >> whole form with a big white space where the webbrowser is. I guess >> that's why I was having so much trouble doing it straight; the >> webbrowser image is sort of outside the scope of the project. >> >> It appears that this is not going to be trivial. Any other ideas? > >You are trying to simulate <CTRL>-<PRINT SCREEN> or <PRINT SCREEN> ?? > > Basically, except that I only want the browser window. My app has the user go online to a site, and they should be able to capture images of what they've done as part of the documentation of the process. These are sites that I have no control over. I'm thinking that I might need to figure out Bitblt and I've been poking around at pinvoke.net (http://www.pinvoke.net/default.aspx/gdi32.BitBlt) but haven't managed to make it work yet. It doesn't blow up, it just doesn't work. I also tried grabbing the webbrowser documenttext and just setting it when I want to recreate the image but that doesn't include any images in the page. Then I tried just saving the whole document into an htmldocument object - I had high hopes for this, but WebBrowser.Document is readonly. I know it can be done. Snagit does it, printscreen does it without any granularity, so I can do it. I just need to figure out how to write a function that takes a webbrowser as a parameter and returns a bitmap. That sounds easy. I figured that it would take ten minutes and I've been working on it on and off for three weeks.
From: Homer J Simpson on 8 Apr 2006 17:46 "dgk" <NoWhere(a)MailsAnonymous.com> wrote in message news:7l6g32hn31ekj4v91n7rsgqioe657ko1h0(a)4ax.com... > I know it can be done. Snagit does it, printscreen does it without any > granularity, so I can do it. I just need to figure out how to write a > function that takes a webbrowser as a parameter and returns a bitmap. > That sounds easy. I figured that it would take ten minutes and I've > been working on it on and off for three weeks. Have you looked at something like "Programming Windows with C#" by Charles Petzold or one of his similar books? Maybe even one for Win95/98 etc? I suspect you MAY be in that territory.
From: Ken Tucker [MVP] on 9 Apr 2006 09:21 Hi, I tested it with the msdn home page and it worked. I did not try this with a flash site so I do not know how this will work with flash. Are you sure the document completed loading before you got the bitmap. The webbrowser has a documentcompleted event you should get the image then. Ken ---------------- "dgk" wrote: > On Sat, 8 Apr 2006 06:40:07 -0400, "Ken Tucker [MVP]" > <vb2ae(a)bellsouth.net> wrote: > > >Hi, > > > > Dock the webbrowser control in a panel. Use the panels drawtobitmap > >method. > > > >Dim bmWb As New Bitmap(Panel1.Width, Panel1.Height) > >Panel1.DrawToBitmap(bmWb, Panel1.ClientRectangle) > > > >PictureBox2.Image = bmWb > > > > > >Ken > > That was clever but it doesn't work; all I get is a white screen. I > then tried getting rid of the panel and using the form, but I get the > whole form with a big white space where the webbrowser is. I guess > that's why I was having so much trouble doing it straight; the > webbrowser image is sort of outside the scope of the project. > > It appears that this is not going to be trivial. Any other ideas? > > >
From: Ken Tucker [MVP] on 9 Apr 2006 09:25 Hi, Did you try saving the documentstream? Ken ------------------ "dgk" wrote: > On Sat, 08 Apr 2006 16:25:37 GMT, "Homer J Simpson" > <nobody(a)nowhere.com> wrote: > > > > >"dgk" <NoWhere(a)MailsAnonymous.com> wrote in message > >news:q4ef32tedskoev545kjo24omdnb4fl829u(a)4ax.com... > > > >> That was clever but it doesn't work; all I get is a white screen. I > >> then tried getting rid of the panel and using the form, but I get the > >> whole form with a big white space where the webbrowser is. I guess > >> that's why I was having so much trouble doing it straight; the > >> webbrowser image is sort of outside the scope of the project. > >> > >> It appears that this is not going to be trivial. Any other ideas? > > > >You are trying to simulate <CTRL>-<PRINT SCREEN> or <PRINT SCREEN> ?? > > > > > Basically, except that I only want the browser window. My app has the > user go online to a site, and they should be able to capture images of > what they've done as part of the documentation of the process. These > are sites that I have no control over. > > I'm thinking that I might need to figure out Bitblt and I've been > poking around at pinvoke.net > (http://www.pinvoke.net/default.aspx/gdi32.BitBlt) but haven't managed > to make it work yet. It doesn't blow up, it just doesn't work. > > I also tried grabbing the webbrowser documenttext and just setting it > when I want to recreate the image but that doesn't include any images > in the page. Then I tried just saving the whole document into an > htmldocument object - I had high hopes for this, but > WebBrowser.Document is readonly. > > I know it can be done. Snagit does it, printscreen does it without any > granularity, so I can do it. I just need to figure out how to write a > function that takes a webbrowser as a parameter and returns a bitmap. > That sounds easy. I figured that it would take ten minutes and I've > been working on it on and off for three weeks. > > >
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: converting ansi to utf8 format - is there anything wrong with it ? urgently requires help Next: DragImageBits |