User Tools

Site Tools

한국어

comfilepi:hiding_the_mouse_cursor:index

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"));
}
comfilepi/hiding_the_mouse_cursor/index.txt · Last modified: 2017/05/10 15:20 by COMFILE Technology