It is certainly possible, somehow, e.g., using the appropriate native Windows API tricks.
Unfortunately, akaik, the Revit API does not provide any support for this.
If it is important for you, you could submit a wish for this functionality to the Revit Idea Station. Whenever you require new or enhanced Revit product or Revit API functionality, the Revit Idea Station is the place to go. Please search there for a corresponding wish list entry for the suggested functionality and add your comments to it, or create a new one, if none already exists:
https://forums.autodesk.com/t5/revit-ideas/idb-p/302
Tag it as an API wish:
https://forums.autodesk.com/t5/revit-ideas/idb-p/302/tab/most-recent/label-name/api
Ensuring that a wish gets as many votes as possible helps underline its importance to you and the rest of the developer community. The Revit Idea Station is currently one of the main driving input forces for Revit API enhancements. The Revit development team look there. Your comment here in the discussion forum might be overlooked.
Thank you!