Manoj Nayak
Manoj Nayak

Reputation: 2509

Checking whether the application in running or which tab is active

I am new to programming. I am trying to develop an application in which i want to find out the time the user has spent with the application. Say the user works with a number of processes(opens a word file,opens paint, opens a browser and browses,opens photoshop etc) These processes come as different tabs in the taskbar. The user will keep switching the tabs. I want to find out the time spent on each day for photoshop.The user has to enter the login time and logout time in date time format, so i will be able to get the date details. I am planning to use the timer. When the photoshop tab is active the timer should start and when he switches the tab, the timer should stop and the value is stored in a variable. Each time the variable value is updated. But how to detect whether photoshop tab is active tab or how to detect whether the user is using the photoshop.Which event to use to find the tab switch.

Upvotes: 4

Views: 204

Answers (1)

Karel Frajták
Karel Frajták

Reputation: 4489

Get the running process and check them periodically, find the active process and calculate the time.

And use Google in fist place!

Upvotes: 1

Related Questions