I need to scrape text off of a form. I can find tons of info on web page
scraping, but barely anything about scraping off of winforms. Is there a
tutorial out there about scraping forms via the windows API?
Hopefully you get an answer from someone that knows this better, but in
essence you have to fund the handle of the main window, then get the list of
child controls, then look at each one, make sure it has the info you want,
and get the info. The devil is in the details of course, specially since
this is all C-based code, you probably would be better off writing a C/C++
routine in a dll to do this and then calling your routine from C#, rather
than making all those calls with C#, you will spend a lot of time worrying
whether or not you are calling the API correctly in addition to what you are
trying to accomplish.
>I need to scrape text off of a form. I can find tons of info on web page
> scraping, but barely anything about scraping off of winforms. Is there a
> tutorial out there about scraping forms via the windows API?
William Sullivan - 07 Mar 2006 00:53 GMT
Thanks for the reply. I know I'll be p/invoking my a.s off; I'm hoping to
get some details on the functions I'll need to call...
> Hopefully you get an answer from someone that knows this better, but in
> essence you have to fund the handle of the main window, then get the list of
[quoted text clipped - 9 lines]
> > scraping, but barely anything about scraping off of winforms. Is there a
> > tutorial out there about scraping forms via the windows API?
Christian Schwendtner - 07 Mar 2006 15:53 GMT
Hi William:
Have a look at:
http://nunitforms.sourceforge.net/docs.html
Its for testing winforms, but probably you can use parts of it.
hth,
Chris
Christian Schwendtner - 07 Mar 2006 15:59 GMT
I think its only for accessing (testing) "owned" forms ...