I am new to programming. I am trying to develop an application in which I want to know the time spent by the user with the application. Say that the user works with several processes (opens a text file, opens paint, opens a browser and views, opens Photoshop, etc.). These processes appear as different tabs on the taskbar. The user will continue to switch tabs. I want to know the time spent on every day for Photoshop. The user must enter the logon time and logout time in a date format, so I can get the date data. I plan to use a timer. When the Photoshop tab is active, the timer should start, and when it switches the tab, the timer should stop, and the value is stored in a variable. Each time the value of a variable is updated. But how to determine if the photoshop tab is active or how to determine if a user is using photoshop. What event should be used to find the tab switch.
source share