31 references to Handle
System.Windows.Forms (5)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3538=> cursor is null ? null : Icon.FromHandle(cursor.Handle).CreateIPictureRCW(copy: true);
System\Windows\Forms\Input\Cursor.cs (2)
214HICON IHandle<HICON>.Handle => (HICON)Handle; 216HANDLE IHandle<HANDLE>.Handle => (HANDLE)Handle;
System\Windows\Forms\Input\CursorConverter.cs (2)
93else if (cursor.Handle == Cursors.Arrow.Handle)
System.Windows.Forms.Tests (26)
System\Windows\Forms\CursorConverterTests.cs (4)
39Assert.NotEqual(IntPtr.Zero, cursor.Handle); 106Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new Cursor(Cursors.AppStarting.Handle), typeof(InstanceDescriptor))); 148Assert.Throws<InvalidOperationException>(() => converter.ConvertTo(new Cursor(Cursors.AppStarting.Handle), typeof(byte[]))); 238string converted = (string)converter.ConvertTo(new Cursor(Cursors.Default.Handle), typeof(string));
System\Windows\Forms\CursorsTests.cs (1)
52Assert.NotEqual(IntPtr.Zero, cursor.Handle);
System\Windows\Forms\CursorTests.cs (21)
33using Cursor cursor = new(sourceCursor.Handle); 34Assert.Equal(sourceCursor.Handle, cursor.Handle); 44Assert.Equal(-1000, cursor.Handle); 68Assert.NotEqual(IntPtr.Zero, cursor.Handle); 119Assert.NotEqual(IntPtr.Zero, cursor.Handle); 156Assert.NotEqual(IntPtr.Zero, cursor.Handle); 230Assert.NotEqual(IntPtr.Zero, cursor.Handle); 246Cursor value = new(Cursors.AppStarting.Handle); 248Assert.Equal(value.Handle, Cursor.Current.Handle); 330Assert.NotEqual(sourceCursor.Handle, handle); 332using Cursor cursor = new(sourceCursor.Handle); 333Assert.Equal(sourceCursor.Handle, cursor.Handle); 344Assert.Throws<ObjectDisposedException>(() => cursor.Handle); 348Assert.Throws<ObjectDisposedException>(() => cursor.Handle); 359Assert.NotEqual(IntPtr.Zero, cursor.Handle); 450Cursor cursor = new(Cursors.AppStarting.Handle); 452yield return new object[] { cursor, new Cursor(Cursors.AppStarting.Handle), true }; 453yield return new object[] { cursor, new Cursor(Cursors.Arrow.Handle), false };