Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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.

Posted
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.

Posted (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 by Camaro Z28

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...