728x90
반응형
728x170
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
...
Size iconSize = SystemInformation.SmallIconSize;
Bitmap iconBitmap = new Bitmap(iconSize.Width, iconSize.Height);
Icon targetIcon = null;
using(Graphics iconGraphics = Graphics.FromImage(iconBitmap))
{
iconGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
iconGraphics.DrawImage(SystemIcons.Error.ToBitmap(), new Rectangle(Point.Empty, iconSize));
targetIcon = Icon.FromHandle(iconBitmap.GetHicon());
}
728x90
반응형
그리드형(광고전용)
'C# > WinForm' 카테고리의 다른 글
[C#/WINFORM] Application 클래스 : StartupPath 정적 속성을 사용해 애플리케이션 실행 경로 구하기 (0) | 2016.12.11 |
---|---|
[C#/WINFORM] Application 클래스 : ThreadException 이벤트를 사용해 예외 처리하기 (0) | 2016.12.04 |
[C#/WINFORM] 비트맵으로 커서 만들기 (0) | 2016.08.30 |
[C#/WINFORM] 특정 위치에서 컨트롤 구하기 (0) | 2016.08.15 |
[C#/WINFORM] 아이콘 구하기 (0) | 2016.07.12 |
[C#/WINFORM] 리소스 아이콘 구하기 (0) | 2016.06.15 |
[C#/WINFORM] FolderBrowserDialog 클래스 사용하기 (0) | 2016.06.01 |
[C#/WINFORM] TreeView 클래스 : DrawNode 이벤트를 사용해 커스텀 노드 그리기 (0) | 2016.05.11 |
[C#/WINFORM] Bitmap 클래스 : 바이트 배열 구하기 (0) | 2016.05.01 |
[C#/WINFORM] Bitmap 클래스 : 바이트 배열에서 비트맵 구하기 (0) | 2016.05.01 |
댓글을 달아 주세요