O
\(O\)enone
I wish to be able to copy a form's icon into a picturebox, in a similar way
to how the Windows Taskbar copies each form's icon into each of its task
panels.
I can easily read out the icon of each form by querying the .Icon property.
However, when I use the Graphics.DrawIcon method to draw this into my
picturebox, it is clearly the "large" version of the icon that is being
drawn. When I draw it with a size of 16x16 pixels, the icon is visibly
distorted compared to the original displayed in the window itself; when I
draw at 32x32 the image is fine and undistorted, but twice the size that I
want it to be.
If there a way for me to extract the small icon for each form so that I can
draw it without it distorting?
Thanks in advance,
to how the Windows Taskbar copies each form's icon into each of its task
panels.
I can easily read out the icon of each form by querying the .Icon property.
However, when I use the Graphics.DrawIcon method to draw this into my
picturebox, it is clearly the "large" version of the icon that is being
drawn. When I draw it with a size of 16x16 pixels, the icon is visibly
distorted compared to the original displayed in the window itself; when I
draw at 32x32 the image is fine and undistorted, but twice the size that I
want it to be.
If there a way for me to extract the small icon for each form so that I can
draw it without it distorting?
Thanks in advance,