-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor.Hide() does not work on Linux/Ubuntu #21750
Comments
You should take a look at alternatives. |
Try |
The solution for us was to do the following: In our C# Windows Form application:
Where the cursor service indefinitely hides the cursor until the cursor service is stopped. The cursor service uses the following code:
|
I have a cross-platform (Windows and Linux) WinForms application. Cursor.Hide() and Cursor.Show() works correctly natively on Windows, but on Linux/Ubuntu using Mono, it does not.
PrjApc - 2024-03-06.zip
The attached zip file contains a very small test program that demonstrates the problem (Hide Cursor and Unhide Cursor). This test program demostrates other mono issues - Japanese character issue https://github.com/mono/mono/issues/21697 and the Mult-line Button issue https://github.com/mono/mono/issues/21696. Pressing the Hide Cursor button does not hide the cursor on Linux/Ubuntu.
Thank you for your help with this! Mono is an awesome software package. I hope it will remain available and supported for quite some time for Ubuntu and Yocto! The Linux version is Ubuntu 22.04.2 LTS. Mono JIT compiler version 6.12.0.199 (tarball Tue 27 Feb 2024 02:34:00 PM UTC).
Though source code is not greatly required for this issue, the main source code is:
`
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Apc
{
#region Class FormMain
public class FormMain : System.Windows.Forms.Form
{
private Button ExitButton;
private Button ToggleLangButton;
private Button ToggleCursorButton;
private Font DefaultProgramFont;
}
`
The text was updated successfully, but these errors were encountered: