> Hi, I'm trying to implement a preview feature in a managed
> application to preview files of arbitrary type. Has anyone done this
> in a managed app? I've seen at least one suggestion that you can host
> prevhost on your form, but I'm not sure this is correct.
I suppose you could, but I think it would be rather hard work. Also, preview handlers are new for Vista so it wouldn't be much use on previous versions. If you just want a pictorial representation of a file, you could show a thumbnail. On Vista, IShellItemImageFactory::GetImage makes this very easy. On older Windows versions, you can fall back to GetUIObjectOf/IExtractImage.

Signature
Jim Barry, MVP (Windows SDK)
Tim Haughton - 23 Jul 2007 09:00 GMT
Thanks Jim, we already have the IShellItemImage factory stuff in their, but
it's kind of a document management application, so we need the preview stuff
as well - and it's a Vista only app.
Cheers,
Tim
Tim Haughton wrote:
> Hi, I'm trying to implement a preview feature in a managed
> application to preview files of arbitrary type. Has anyone done this
> in a managed app? I've seen at least one suggestion that you can host
> prevhost on your form, but I'm not sure this is correct.
I suppose you could, but I think it would be rather hard work. Also, preview
handlers are new for Vista so it wouldn't be much use on previous versions.
If you just want a pictorial representation of a file, you could show a
thumbnail. On Vista, IShellItemImageFactory::GetImage makes this very easy.
On older Windows versions, you can fall back to GetUIObjectOf/IExtractImage.
Tim,
Why not just declare the interfaces in C# code manually? They are not
that big, and the types are not so complex that it would be very difficult.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Hi, I'm trying to implement a preview feature in a managed application to
> preview files of arbitrary type. Has anyone done this in a managed app?
[quoted text clipped - 10 lines]
>
> Tim
Tim Haughton - 23 Jul 2007 09:02 GMT
Thanks Nicholas, I'm heading that way, so I'll give it a look.
Tim
> Tim,
>
[quoted text clipped - 16 lines]
>>
>> Tim