I cannot create a new post due to an error on the web form that prevents me
from selecting a newsgroup, so I am replying to this one... this should
really be a separate question.
I succeeded at writing a Windows Forms app to write values into text fields
on a PDF, save the PDF and email or fax the PDF to customers, and then the
server team asked me to turn the program into a Windows Service.
I'm having a couple of problems related to removing windows.forms from the
project. The problem I can't resolve or work around is that the Adobe
Acrobat API may throw message boxes during processing. I handled this in my
windows.form app by enumerating all open windows looking for a particular
window title and then sending an enter key to the window using SendKeys from
system.windows.forms.
So, in trying to convert the program, I realize that I will not be able to
use this method (can't compile). I'm guessing that the API trying to throw a
window may cause the service to hang anyway, although I don't know. I'll
test that next.
Other problems I have had caused by removing the windows.forms is that I
cannot use invoke to return to my original thread. I also can't bind a
FileSystemWatcher to the main thread of the app. These problems I can get
around.
I hope that there is a way to succeed at making this program a service.
Does anyone have any ideas?
Thanks,
Geoff