✅ Win Form Event Handlers question
Hi, I was just wondering if there is an event handler when the win form is idle that I can then run code in. I am looking to use it as a modeless form alongside the Revit API to sync a 2D drawing and a 3D model view together. I am currently using the Revit API Idle event, however I want to change this method of functionality to be toggled via a button in a win form as it adds unnecessary load to the Revit application.
Once alternative method I thought about was running on a mouse move event, or if there is some kind of user input.
3 Replies
There's definitely a Win32 API to get the last input time of a user, I'm not sure if there's anything built-in which would notify you of an idle state though
I guess you probably need to write your own handler which periodically checks the last input time and executes code once it reaches the threshold you need
Yeah thought it might just be easier to generate my own, thanks for the second opinion!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.