This documentation is archived and is not being maintained.

Cursor.Show Method

Displays the cursor.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static void Show()

The Show and Hide method calls must be balanced. For every call to the Hide method there must be a corresponding call to the Show method.

The following code example hides the cursor when the mouse pointer enters the button's client area. Likewise, when the mouse pointer leaves the button's client area, the cursor is shown again. This example requires a Form with a Button named myButton.

private void myButton_MouseEnter(object sender, System.EventArgs e)
   // Hide the cursor when the mouse pointer enters the button.

private void myButton_MouseLeave(object sender, System.EventArgs e)
   // Show the cursor when the mouse pointer leaves the button.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0