Home All Groups Group Topic Archive Search About
Author
6 Mar 2006 11:48 PM
William Sullivan
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?

Author
7 Mar 2006 12:02 AM
Gabriel Magaña
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.


Show quote
"William Sullivan" <WilliamSulli***@discussions.microsoft.com> wrote in
message news:32CDACA1-A316-4FE6-9048-818BD26A0245@microsoft.com...
>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?
Author
7 Mar 2006 12:53 AM
William Sullivan
Thanks for the reply.  I know I'll be p/invoking my ass off; I'm hoping to
get some details on the functions I'll need to call...

Show quote
"Gabriel Magaña" wrote:

> 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.
>
>
> "William Sullivan" <WilliamSulli***@discussions.microsoft.com> wrote in
> message news:32CDACA1-A316-4FE6-9048-818BD26A0245@microsoft.com...
> >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?
>
>
>
Author
7 Mar 2006 3:53 PM
Christian Schwendtner
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
Author
7 Mar 2006 3:59 PM
Christian Schwendtner
I think its only for accessing (testing) "owned" forms ...

AddThis Social Bookmark Button