System.Drawing.Icon icon = System.Drawing.Icon.ExtractAssociatedIcon(str_ExePath); System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon( icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
返回类型 System.Windows.Media.Imaging.BitmapSource