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