48 references to Handle
System.Drawing.Common.Tests (38)
mono\System.Drawing\BitmapTests.cs (4)
1194
using Bitmap bitmap = Bitmap.FromHicon(icon.
Handle
);
1212
using Bitmap bitmap = Bitmap.FromHicon(icon.
Handle
);
1230
using Bitmap bitmap = Bitmap.FromHicon(icon.
Handle
);
1248
using Bitmap bitmap = Bitmap.FromHicon(icon.
Handle
);
System\Drawing\BitmapTests.cs (3)
674
GetHicon_FromHicon_ReturnsExpected(icon.
Handle
, width, height);
675
using var bitmap = Bitmap.FromHicon(icon.
Handle
);
768
AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(icon.
Handle
));
System\Drawing\IconTests.cs (30)
227
Assert.NotEqual(sourceIcon.
Handle
, icon.
Handle
);
239
Assert.NotEqual(sourceIcon.
Handle
, icon.
Handle
);
284
Assert.NotEqual(icon.
Handle
, clone.
Handle
);
293
using var icon = Icon.FromHandle(SystemIcons.Hand.
Handle
);
296
Assert.NotEqual(icon.
Handle
, clone.
Handle
);
307
Assert.Throws<ObjectDisposedException>(() => icon.
Handle
);
316
Assert.Throws<ObjectDisposedException>(() => icon.
Handle
);
323
using var icon = Icon.FromHandle(source.
Handle
);
324
IntPtr handle = icon.
Handle
;
328
Assert.Equal(handle, icon.
Handle
);
460
var icon = Icon.FromHandle(source.
Handle
);
480
using var icon = Icon.FromHandle(source.
Handle
);
545
using Icon icon = Icon.FromHandle(originalIcon.
Handle
);
637
using Icon icon2 = Icon.FromHandle(icon1.
Handle
);
638
Assert.Equal(icon1.
Handle
, icon2.
Handle
);
647
using (Icon icon2 = Icon.FromHandle(icon1.
Handle
))
649
Assert.Equal(icon1.
Handle
, icon2.
Handle
);
654
using Icon icon3 = Icon.FromHandle(icon1.
Handle
);
655
Assert.Equal(icon1.
Handle
, icon3.
Handle
);
670
Assert.Equal(handle, icon2.
Handle
);
686
Assert.Equal(handle, icon2.
Handle
);
692
Assert.Equal(handle, icon3.
Handle
);
836
Assert.NotEqual(0, icon.
Handle
);
System\Drawing\TextureBrushTests.cs (1)
42
using var image = Bitmap.FromHicon(icon.
Handle
);
System.Windows.Forms (7)
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
353
int index = PInvoke.ImageList.ReplaceIcon(this, -1, new HandleRef<HICON>(icon, (HICON)icon.
Handle
));
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (1)
151
: this(icon.
Handle
)
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
26
public HICON Handle => (HICON)_icon.
Handle
;
System\Windows\Forms\Form.cs (3)
3354
PInvokeCore.SendMessage(TaskbarOwner, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_BIG, (LPARAM)icon.
Handle
);
6365
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_SMALL, (LPARAM)_smallIcon.
Handle
);
6368
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_BIG, (LPARAM)icon.
Handle
);
System\Windows\Forms\NotifyIcon.cs (1)
656
data.hIcon = _icon.
Handle
;
System.Windows.Forms.Tests (3)
System\Windows\Forms\ComponentModel\Com2Interop\COM2PictureConverterTests.cs (1)
76
nint handle = errorIcon.
Handle
;
System\Windows\Forms\ErrorProviderTests.cs (2)
1334
nint handle = icon.
Handle
;
1341
Assert.Equal(handle, icon.
Handle
);