在 Windows 7 缩略图预览中设置位图 [英] Setting a Bitmap in Windows 7 thumbnail preview

查看:23
本文介绍了在 Windows 7 缩略图预览中设置位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将 Windows 7 API 代码包用于我正在编码的应用程序C#.目前,我了解如何将部分窗口区域或控件绘制到缩略图预览中:

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));

但是,我想在缩略图中绘制位图图像.有一种方法,但没有很好地记录.设置位图i的方法:

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) 位图的缩略图预览.

That does work, but it still doesn't set the thumbnail preview of the (bmptest) bitmap.

我想知道这里是否有人对 Windows 7 API 代码包有深入的了解,他们能否请我指出如何在缩略图预览中设置位图图像的正确方向.

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 代码包,但 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 缩略图预览中设置位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆