Home Forums Software Development Making a taskbar icon GazeAware

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9056
    John
    Participant

    Hi,

    I am building an application for a school project using the Tobii EyeTracker 4C. My project group is building a UI that uses the gaze to open various applications. What I noticed is that while our application is GazeAware, when it opens up a new application that comes to the foreground overtop of the MainWindow we have designed, there is no way to bring our application to the foreground without using the mouse. Though I am no expert in .Net, it seems the Tobii Core SDK only makes objects within the MainWindow GazeAware, and therefore the icon for the MainWindow in the taskbar is not able to be GazeAware.

    So my question goes out to those of you with more experience with .Net and the Tobii Core SDK: is there a way to make an icon in the Taskbar GazeAware? Let me know if my description isn’t detailed enough and I will provide more info.

    Thanks for reading!

    #9096
    Grant [Tobii]
    Keymaster

    Hi @jsneal519, thanks for your query and patience whilst we tried to find a solution for your needs. There is within .NET the possibility to “SetFocus”: https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setfocus

    Which you could implement to run after a certain time in which no gaze data is received within the application. Alternatively, you could try to set your gaze-aware application to be ‘always on top’ which you can implement using .NET: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.form.topmost?view=netframework-4.7.2 or alternatively a third party program or even a simple script via Autohotkey. Although this technique may not necessarily be full proof.

    As it stands, there is not currently a method to make the taskbar icon gaze aware, so hopefully one of these workarounds should satisfy your requirements.

    Please let us know if we can be of any further assistance.

    #9165
    John
    Participant

    Thanks, Grant! Sorry for responding so late. I’ve been in end of semester hell. We ended up using the Window.Topmost() = true workaround to make our floating icon, a Window, always appear on top of any other windows opened while using our UI. This allowed one to access our UI hands-free even if the user had other windows open, and it served well for presenting the project and demoing the UI to other students. Is it a long-term solution for the application if it were to be made into a product? I have no idea, and would need to do more research.

    #9168
    Grant [Tobii]
    Keymaster

    Hi @jsneal519, thanks for your feedback. Indeed, making the window topmost is not fullproof as it can be overridden by other windows which have been also given topmost status. Long term, I think ‘setfocus’ call as explained above would be more appropriate.

    Try it out and let us know how you get on. Best wishes.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.