Re: Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?
- From: "David" <davidd31415@xxxxxxxxxxx>
- Date: Tue, 7 Aug 2007 10:37:42 -0400
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
news:umCbykL2HHA.1484@xxxxxxxxxxxxxxxxxxxxxxx
"David" <davidd31415@xxxxxxxxxxx> schrieb:
I would like to use a AxSHDocVw.WebBroswer control in a Windows service-
is this possible without creating a form? I added the reference I usually
use to add this object in a Windows Application but only SHDocVw appears
under References in the Solution Explorer.
I wonder why you would want to use a visual control in a service which
doesn't provide a user interface.
* What exactly do you want to archieve?
* Which version of .NET are you using?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
I'm writing a service that will connect to a website on a regular basis,
retrieve information, and then update external devices- this works fine as
an application but I would rather not use task scheduler to run it and a
service sounds like the best method for this. I started out using
HttpWebRequest but was not successful logging into the website with it-
axWebBrowser worked nicely.
I tried using the common component WebBrowser instead of the ActiveX one but
ran into problems accessing the DOM. I tried creating a HTMLDocument
variable and setting it equal to WebBrowser.Document but encountered a
"specified cast is not valid" error. Using the debugger to look at the
WebBrowser.Document property lead me to a "cannot obtain value" message- the
WebBrowser had loaded a webpage so I'm stuck there with that one, and stuck
with the event handler on SHDocVw.WebBrowser.
.
- Follow-Ups:
- References:
- Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?
- From: David
- Re: Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?
- From: Herfried K. Wagner [MVP]
- Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?
- Prev by Date: Re: Dates
- Next by Date: Re: TextBox_KeyPress event
- Previous by thread: Re: Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?
- Next by thread: Re: Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?
- Index(es):
Relevant Pages
|