コード例 #1
0
 private BitmapSource GetMaxIcon()
 {
     // only works in the context of 3ds Max
     try
     {
         var hBitmap = AppSDK.GetMainApplicationIcon().ToBitmap().GetHbitmap();
         return(Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty,
                                                      BitmapSizeOptions.FromEmptyOptions()));
     }
     catch (Exception ex)
     {
         Log.Instance.Error($"{ex.Message}\n{ex}", Strings.SubmitJob_Icon_Error);
         return(null);
     }
 }
コード例 #2
0
ファイル: SugzForm.cs プロジェクト: Sugz/CSharp
 /// <summary>
 /// Sets the main form icon based on the application icon.
 ///
 /// </summary>
 private void InitializeMainIcon()
 {
     this.Icon = AppSDK.GetMainApplicationIcon();
 }