첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System;
using System.Drawing;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media.Imaging;

Icon icon = System.Drawing.Icon.ExtractAssociatedIcon("source.ico");

Bitmap bitmap = icon.ToBitmap();

IntPtr bitmapHandle = bitmap.GetHbitmap();

BitmapSource bitmapSource = Imaging.CreateBitmapSourceFromHBitmap
(
    bitmapHandle,
    IntPtr.Zero,
    Int32Rect.Empty,
    BitmapSizeOptions.FromEmptyOptions()
);
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요