471,337 Members | 1,132 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Listening for dialog box from another program

I am trying to make a program that times how long it takes to do
something in another program. Is there away to make my timer program
listen for a dialog box to open on the other program and then perform
some functions in my timer program? I do not have the source code for
the program I am trying to listen to. Does anyone know how/if I can do
this?

Dec 28 '05 #1
4 1498
Opettaja,

It will be VERY difficult to do this. Unless it has an interface of
some sort (as in remoting, automation, or something) to control it, you will
have to resort to sending messages to the app and then trying to hook into
the results, which is not a small proposition at all.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Opettaja" <op******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I am trying to make a program that times how long it takes to do
something in another program. Is there away to make my timer program
listen for a dialog box to open on the other program and then perform
some functions in my timer program? I do not have the source code for
the program I am trying to listen to. Does anyone know how/if I can do
this?

Dec 28 '05 #2
lol okay, well its not worth it, its just a stop watch thats timing how
long it takes to save and load from database with a program from work.
I will just manually click the start and stop button I guess.

Dec 28 '05 #3
Opettaja kirjoitti:
I am trying to make a program that times how long it takes to do
something in another program. Is there away to make my timer program
listen for a dialog box to open on the other program and then perform
some functions in my timer program? I do not have the source code for
the program I am trying to listen to. Does anyone know how/if I can do
this?


You could try something like Win32 API FindWindow or FindWindowEx and
periodically check if the dialog/window can still be found (by those
funcs). Something remotely like
http://www.codeproject.com/csharp/cskillapp.asp

No idea how well it would work for your purposes, though :)

- Jan
Dec 28 '05 #4
You can use a profiler to do performance analysis of managed code - very
good one in my opinion is ANTS Profiler

"Opettaja" <op******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
lol okay, well its not worth it, its just a stop watch thats timing how
long it takes to save and load from database with a program from work.
I will just manually click the start and stop button I guess.

Dec 29 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by ssantamariagarcia | last post: by
5 posts views Thread by Adam | last post: by
23 posts views Thread by George | last post: by
6 posts views Thread by kai | last post: by
2 posts views Thread by Joseph Sheppard | last post: by

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.