Home Forums Software Development Is it possible to hide the cursor?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #9187
    Ray
    Participant

    Hey, I was wondering if it is possible to hide the cursor globally.
    I know that Cursor.Hide() hides it inside a form, but if i move my mouse outside a form, it just shows it again. I kind of want the same functionality that Project IRIS has when it comes to hiding the cursor. I still want to be able to use the mouse’s functionalities (move around and click) but have the cursor hidden.

    I tried making a full screen form and make it transparent, but the mouse can’t click through the form or the mouse is visible, I can’t combine both.

    Does anyone know a way to achieve this?
    Making this using C#/.NET and Winforms.

    #9192
    Grant [Tobii]
    Keymaster

    Hi @raynlaze, thanks for your query. Certainly, hiding the mouse cursor globally is not a feature that is available via the Tobii Core SDK, so you would have to investigate a solution using a more general methodology within .NET

    From what I have seen online, a possible workaround may be to create your application fullscreen and use Cursor.Hide() within this window.
    Other possibilities such as fixing the mouse position on screen but I don’t think that would work for your needs?

    In any event, you would be overriding global settings via a single application which is not something generally recommended. Perhaps you could elaborate on your project goals and we could find a suitable solution for you.

    #9195
    Ray
    Participant

    Hey @Grant thank you for your reply.

    I have tried making the form fullscreen and using Cursor.Hide() on it. However, I have issues with combining the following things together:
    – The form being fully transparent
    – Allowing to click through the transparent window
    – The cursor being hidden

    I can make a transparent form and click through it, but then the cursor won’t be hidden. I also can make the form transparent and the cursor hidden, but then I can’t click through the form. I can’t get all 3 functionalities working at the same time. I did a lot of research, but couldn’t find a solution for this.

    The reason for hiding the cursor is because I became inspired by the application Project IRIS and would like to have the same kind of functionality.

    #9199
    Grant [Tobii]
    Keymaster

    Hi @raynlaze, I am afraid on this forum we generally only provide support in relation to our own eye tracking hardware and software products so in this instance I would suggest you can either contact the IRIS developer who I believe it still quite active or of course another more generic platform such as stackoverflow.

    I also thought you could try creating a custom cursor theme on your system that uses no pixels as image as a possible workaround.

    #9212
    Ray
    Participant

    Hey @Grant, I tried both those things two weeks ago. Unfortunately the person behind IRIS didn’t respond and on stackoverflow I didn’t get a serious response. That’s why I wanted to give this forum a go. Thank you anyway for trying to help.

    #9216
    Grant [Tobii]
    Keymaster

    Hi @raynlaze, okay sorry to hear that.. hopefully you will get a positive response soon, did you look at changing to blank cursor theme?

    #9232
    Elsa Black
    Participant

    If you use Windows, you can use the “hidden cursor” theme.
    You will need to use keyboard shortcuts to get it back, though. If you never use the cursor, this is the best solution.

    #9241
    Ray
    Participant

    Thanks for helping, i didn’t see a hidden cursor scheme by default, so i created one myself. Is there a way to bring this cursor scheme to other people’s PC’s (just like resources)? How to make sure they also have this scheme. And how will i know which cursor scheme is the hidden cursor one, taking that i would have to set it by cursor scheme id (https://stackoverflow.com/questions/41713827/programatically-change-custom-mouse-cursor-in-windows)

    #9242
    Grant [Tobii]
    Keymaster

    Hi @raynlaze, to deploy cursor schemes to remote systems in an automated way, the most logical approach may be to use group policy. I found this link below which should point you in the right direction: https://serverfault.com/questions/108972/change-force-mouse-pointer-schemes-via-gpo-or-other-ways

    In terms of checking *which* scheme is in use and changing accordingly, it seems like the stackoverflow link you posted shows a good technique for this.
    Accordingly, you could integrate this into your program to switch themes and revert upon and after launch.
    Ultimately, did the hidden cursor theme therefore provide a suitable workaround for your needs?

    #9249
    Ray
    Participant

    Hey @Grant, I can’t quite figure out how to use the stackoverflow link to change the entire scheme. It seems like it only shows how to change a certain cursor without the current scheme, unless I missed something. Also about the serverfault link, would this work in Windows 10 and what would the C# equivalant be of it?

    If I could safely deploy and apply the cursor theme on someone’s PC when pressing a keybind and also revert it back to default after the application is quit unexpectedly or something like that (windows reset key), then this option would provide a suitable workaround for my needs.

    #9263
    Grant [Tobii]
    Keymaster

    Hi @raynlaze, glad to hear you are pursuing the intention, but I am afraid that this type of .NET support is rather outwith the scope of this forum as the primary intention is for Core SDK and Interaction related questions. I should think the best bet is to post your issues regarding the stackoverflow link directly on the page as users are typically notified when their solutions receive a comment.

    Of course, we would be more than happy to hear how you get on following their advice. Thanks for your understanding.

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