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