Cursor.Current 属性
获取或设置代表鼠标光标的光标对象。
**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)
语法
声明
Public Shared Property Current As Cursor
用法
Dim value As Cursor
value = Cursor.Current
Cursor.Current = value
public static Cursor Current { get; set; }
public:
static property Cursor^ Current {
Cursor^ get ();
void set (Cursor^ value);
}
/** @property */
public static Cursor get_Current ()
/** @property */
public static void set_Current (Cursor value)
public static function get Current () : Cursor
public static function set Current (value : Cursor)
属性值
一个 Cursor,它代表鼠标光标。如果鼠标光标不可见,则默认为 空引用(在 Visual Basic 中为 Nothing)。
备注
设置 Current 属性会更改当前显示的光标。应用程序可能(也可能不)继续侦听鼠标事件。若要发出信号表示应用程序不应在长时间运行的操作期间响应鼠标事件,请使用 UseWaitCursor 属性。但是,大多数情况下,最好使用后台线程管理长时间运行的操作,并使用户界面可供用户访问。有关简单地实现后台任务的更多信息,请参见 BackgroundWorker。
.NET Framework 安全性
- UIPermission 用于安全子窗口设置此属性。关联的枚举:UIPermissionWindow.SafeSubWindows
平台
Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0
.NET Compact Framework
受以下版本支持:2.0、1.0