473,382 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Detecting Another Application's Events

In some situations MS Word is started in another thread by the end user.

I am trying to figure out how, if possible, to detect if the user has shut
down MS Word so I can kill the thread and clean up the instance.

Any ideas?
Nov 20 '05 #1
4 867
* "scorpion53061" <Its the end of the world as we know it@here.com> scripsit:
In some situations MS Word is started in another thread by the end user.

I am trying to figure out how, if possible, to detect if the user has shut
down MS Word so I can kill the thread and clean up the instance.


Thread? Process?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Hi Herfried,

I guess what i need help with is a way to know when the user has shut MS
Word down.

I am thinking there has to be a way to know the proces or thread that this
instance is taking.

can you help me iwht this?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OE*************@TK2MSFTNGP12.phx.gbl...
* "scorpion53061" <Its the end of the world as we know it@here.com>

scripsit:
In some situations MS Word is started in another thread by the end user.

I am trying to figure out how, if possible, to detect if the user has shut down MS Word so I can kill the thread and clean up the instance.


Thread? Process?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3
Just in case you understand me right I am creating a MS Word report they are
choosing to view.

I am trying to detect when they are no longer viewing it.(have it open, have
shut it down)

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OE*************@TK2MSFTNGP12.phx.gbl...
* "scorpion53061" <Its the end of the world as we know it@here.com>

scripsit:
In some situations MS Word is started in another thread by the end user.

I am trying to figure out how, if possible, to detect if the user has shut down MS Word so I can kill the thread and clean up the instance.


Thread? Process?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #4

Using an AppActivate "Microsoftl Word" statement would generate an
error and tell you that no instances of Word is open

If you know the title of the window that Word would contain, you could
determine if your report is still open:
AppActivate "Your Report Name - Microsoft Word"

On Fri, 13 Feb 2004 17:13:08 -0600, "scorpion53061" <Its the end of
the world as we know it@here.com> wrote:
Just in case you understand me right I am creating a MS Word report they are
choosing to view.

I am trying to detect when they are no longer viewing it.(have it open, have
shut it down)

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OE*************@TK2MSFTNGP12.phx.gbl...
* "scorpion53061" <Its the end of the world as we know it@here.com>

scripsit:
> In some situations MS Word is started in another thread by the end user.
>
> I am trying to figure out how, if possible, to detect if the user hasshut > down MS Word so I can kill the thread and clean up the instance.


Thread? Process?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
1
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
7
by: Aarti | last post by:
I have written a windows service that needs to perform certain functions only if a User is logged in. The problem I am running into is that I get an error if the computer is in the process of being...
5
by: cashdeskmac | last post by:
I want to detect when the users computer is going to close down so that I can write all unfinished data to a file before closing down. Does anyone know how this is done?
5
by: David Griffin | last post by:
I have a console application that spawns off several C# threads. It needs to react to shutdown of the system by performing some end of program activities including writing some files and closing...
1
by: Tuong | last post by:
I have a situation where i have a form that contains a webbrowser control. With this I was able to implement an application that can browse websites. One particular website i visited opens up...
0
by: tuism | last post by:
Hi all, I hava java application that wants to receive windows events when a device like an USB or Firewire is plugged in. I know how to do this natively in C++ where I can register a window to...
7
by: BLUE | last post by:
Are there events that are fired when I insert the handheld into or I remove it from the cradle? *OpenNETCF.Desktop.Communication.ActiveSync* class has *Active* (indicates that a connection is...
8
by: squash+go | last post by:
For an abstract algebra class that I will be teaching, I'm trying to convert a text-based game that I wrote in Common Lisp to a graphical game in javascript. (I know nothing of javascript, but I...
15
by: RobG | last post by:
When using createEvent, an eventType parameter must be provided as an argument. This can be one of those specified in DOM 2 or 3 Events, or it might be a proprietary eventType. My problem is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.