Ejemplo n.º 1
0
 private void UpdateThumbnail()
 {
     DwmThumbnailProperties props = new DwmThumbnailProperties();
     props.Flags = DwmThumbnailFlags.RectDestination | DwmThumbnailFlags.Opacity | DwmThumbnailFlags.Visible | DwmThumbnailFlags.SourceClientAreaOnly;
     props.SourceClientAreaOnly = this.ClientAreaOnly;
     props.Opacity = (byte)(this.Opacity * (double)byte.MaxValue);
     props.Visible = this.IsVisible;
     System.Windows.Point point1 = this.Destination.TranslatePoint(new System.Windows.Point(0.0, 0.0), (UIElement)this.window);
     System.Windows.Point point2 = this.Destination.TranslatePoint(new System.Windows.Point(this.Destination.ActualWidth, this.Destination.ActualHeight), (UIElement)this.window);
     props.rcDestination = new Advent.Common.Interop.RECT((int)point1.X, (int)point1.Y, (int)point2.X, (int)point2.Y);
     Marshal.ThrowExceptionForHR(Advent.Common.Interop.NativeMethods.DwmUpdateThumbnailProperties(this.thumbnailHandle, ref props));
 }
Ejemplo n.º 2
0
 public static extern int DwmUpdateThumbnailProperties(IntPtr HThumbnail, ref DwmThumbnailProperties props);
Ejemplo n.º 3
0
 public static extern int DwmUpdateThumbnailProperties(IntPtr HThumbnail, ref DwmThumbnailProperties props);