Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

VB Question

  • 30-11-2001 7:40pm
    #1
    Closed Accounts Posts: 53 ✭✭


    I need to write a small app that will check to see if a window is active every 5 mins and if not activate it. Does anyone know of an app that could be downloaded to do this? I think it could be done easily with VB using the appactivate command?? Does anyone know how it could run on a timer?


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    To run it on a timer just include a form in you vb app and add a timer control to it. Then within a class module, or bas file, create in instance of the form, without making it visible, and you have access to the timer. Note: the timercontrol's intervals only go up to 60 seconds so you'll have to code around this. Or you could write your own :)


    For activating the app you could use the SetFocusAPI method in user32. Look it up in the api viewer. All you need is to pass a windows handle for the application in question and it will bring it to the top and set the focus on it. Any questions don't be afraid to ask.


Advertisement