Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 4th, 2009, 08:05 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default IExtractImage Anyone

I am writing a program that shows documents that are stored within a SQL server Database. The documents(resource) all have Mime types so when calling for the resources info i get everything in need. I would like to set up a dataview to show the icon of that resource. E.g. if it's a pdf a pdf icon is shown. if it is a word doc then the word icon is shown. I have looked at IExtractImage which shouldn't provide any problems, was just wondering if anyone else knows of another way?
  #2 (permalink)  
Old February 4th, 2009, 08:11 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

IExtractImage is used, typically, to extract thumbnail images in the sense that i have XYZ png files and this is what a thumbnail of them looks like. You aren't doing that, you simply want to display a given icon based upon the mime type.

If it were me I would either A) place a relative path to the icon in the database soL /images/icons/pdf.png or B) use a switch statement to determine which icon to display as I am binding the data.

I think trying to use this COM Interface is overkill and will cause you more time then its worth.

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================






Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.