Hiding the Mouse Cursor

There is typically no need for a mouse cursor in a touch screen application, but the ComfilePi and Mono will give you one anyway. However, the mouse cursor can be hidden by setting the cursor to an “empty” .cur file.

Add the .cur file to your project as a resource, and then use code similar to the following to set the cursor in the main window's constructor.

Download hiddencursor.cur

public Form1()
{
    InitializeComponent();
 
    var asm = Assembly.GetExecutingAssembly();
    Cursor = new Cursor(asm.GetManifestResourceStream("ModbusExample.Resources.hiddencursor.cur"));
}