开发者

Implementing timer states(Available,Busy,Away etc) in a chat application vb8

开发者 https://www.devze.com 2023-01-27 22:00 出处:网络
I am currently developing a chat application and am trying to i开发者_StackOverflow社区nclude: Various states, like MSN does, available, busy and away.

I am currently developing a chat application and am trying to i开发者_StackOverflow社区nclude:

  • Various states, like MSN does, available, busy and away.
  • If the user doesn't touch the keyboard for one minute, the state of the user isto be changed into Away. Or something similar to these.

I also need the program to be able to play a sound while running.

Can the community aid me with resources to help me implement this and perhaps any code if anyone has experience with a similar application?


To manage an inactive state, what you can do is use a timer paired with a global keyboard hook (the article is for C#, but you can easily translate it to VB.NET). Each time your application receives a keyboard message, the timer will be reset to the inactivity interval. If the timer runs out, you can set the status of your application to be inactive.

0

精彩评论

暂无评论...
验证码 换一张
取 消