q1w2e3r4t7 Posted December 12, 2007 Posted December 12, 2007 Hi, trying to create a program to log what programs i have open. i'd like to be able to get a list of all open applications, however most importantly, the active application. this way i can log what applications i use, and what % of the day i use each. does anyone know the code to get this information? thanks Quote
q1w2e3r4t7 Posted December 12, 2007 Author Posted December 12, 2007 Finally found the code, however i have to use a time to keep checking ... is there anyway to hook onto the change active window process ? rather than continuously checking? ta. Quote
JumpyNET Posted December 19, 2007 Posted December 19, 2007 Finally found the code, however i have to use a time to keep checking ... If you find a solution to a question you have posted, then please post the solution for others to see. That way everyone visiting this forum can benefit from it. Quote
Camaro Z28 Posted December 20, 2007 Posted December 20, 2007 (edited) Finally found the code, however i have to use a time to keep checking ... is there anyway to hook onto the change active window process ? rather than continuously checking? ta. Hi, I guess if you don't want to use a VB timer try using the Windows API Timer. The API is SetTimer/KillTimer. Just create a callback to the method you want fired at the end of the specified interval. It won't really use any of your applications resources and allows Windows to deal with the timing. I have a example on how to access and program the Windows timer at my website under the VB.NET - Examples page. http://www.vbcodesource.com . Maybe this will help you? :) Edit: I also wanted to mention that you can use the API call: Private Declare Function GetActiveWindow Lib "user32" () As Int32 - To get the Top Level Window. Jason Edited December 20, 2007 by Camaro Z28 Quote Visual Basic Code Source FREE Visual Basic Source Code
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.