yes, i think so.
But it's not using different thread to monitor it? Because I think it should
be monitoring per session.
um... anything i can solve it?
If you are really after working with MS office objects, then I would use
office interop objects rather than processes. By connecting to an
Excel.Application object, you should be able to monitor when each sheet is
closed, edited, printed, or anything else. With a singleton application,
like Excel, I'm afraid you cannot get to what I believe you are seeking.
In general though, your code would have worked. Take notepad for example.
It would have opened two instances of itself, each with the provided file.
> yes, i think so.
>
[quoted text clipped - 15 lines]
> > Are you seeing both spreadsheets shown in one instance of Excel? That is
> > what I would expect.
Benny Lam - 19 Dec 2007 14:59 GMT
Sigh.... I may need to deeply consider your suggestion... Many thanks!
But, i still want to hear other comments...
> If you are really after working with MS office objects, then I would use
> office interop objects rather than processes. By connecting to an
[quoted text clipped - 24 lines]
> > > Are you seeing both spreadsheets shown in one instance of Excel? That is
> > > what I would expect.
Patrice - 19 Dec 2007 18:25 GMT
I noticed you taked about cmd.exe ? What if you launch the real exe file
instead ?
If you are using something like start or cmd myfile.ext, I'm afraid it will
launch the application associated with the "ext" extension and then will
terminate. So basically you are not monitoring the actual application but
the application that launches the actual application...
I would do a quick test using notepad.exe as suggested by Mike as a proof of
concept (to see if it works when launching notepad.exe and to see if it
still works if using cmd.exe to open a text file that is launching
notepad.exe indirectly still works or make what previously worked fails)...
--
Patrice
> Sigh.... I may need to deeply consider your suggestion... Many thanks!
>
[quoted text clipped - 35 lines]
>> > > That is
>> > > what I would expect.
Benny Lam - 21 Dec 2007 15:42 GMT
Oh... i tried to run it alone, it's still the same result.
I may try to monitor the process name or whatever, not use the WaitForExit
again...
Thanks your hlep.
> I noticed you taked about cmd.exe ? What if you launch the real exe file
> instead ?
[quoted text clipped - 51 lines]
> >> > > That is
> >> > > what I would expect.