设置位图在Windows 7中的缩略图preVIEW [英] Setting a Bitmap in Windows 7 thumbnail preview
问题描述
我目前使用的是的Windows 7 API code组一>为应用程序我编码在C#。 目前,我知道如何绘制窗口区域或控制进入缩略图preVIEW的一部分:
I am currently using the Windows 7 API Code pack for an application I am coding in C#. Currently, I understand how to draw part of the Window region or a control into the thumbnail preview:
TaskbarManager.Instance.TabbedThumbnail.SetThumbnailClip((new WindowInteropHelper(this)).Handle, new System.Drawing.Rectangle((int)v.X, (int)v.Y, (int)pictureBox1.RenderSize.Width, (int)pictureBox1.RenderSize.Height));
不过,我想画一个位图图像转换成缩略图。存在用于它的一个方法,但它未记录得很好。设置方法的位图我:
However, I am wanting to draw a Bitmap image into the thumbnail. There is an method for it, but it is not documented very well. The method to set a bitmap i:
System.Drawing.Bitmap bmptest = new System.Drawing.Bitmap(ms);
tb.SetImage(bmptest)
这不工作,但它仍然没有设置(bmptest)位图的缩略图preVIEW。
That does work, but it still doesn't set the thumbnail preview of the (bmptest) bitmap.
我想知道是否有任何人在这里谁拥有见识到了Windows 7的API code组,如果他们能请点我到正确的方向如何在缩略图preVIEW设置一个位图图像
I am wondering if there is anybody here who has an insight into the Windows 7 API code pack and if they could please point me into the right direction with how to set a bitmap image in the thumbnail preview.
推荐答案
我从来没有与Windows 7 API code组,但Bitmap类有一个 GetThumbnailImage(...)
方法,它可以给你所需要的。
I have never worked with the Windows 7 API code pack, but the Bitmap class has a GetThumbnailImage(...)
method which may give you what you need.
这篇关于设置位图在Windows 7中的缩略图preVIEW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!