Click here to Skip to main content
16,010,114 members
Home / Discussions / C#
   

C#

 
GeneralRe: Preventing automated registering Pin
J4amieC4-Feb-05 3:50
J4amieC4-Feb-05 3:50 
GeneralRe: Preventing automated registering Pin
Christian Graus4-Feb-05 18:20
protectorChristian Graus4-Feb-05 18:20 
GeneralRepositioning windows form question... Pin
new_phoenix3-Feb-05 11:49
new_phoenix3-Feb-05 11:49 
GeneralRe: Repositioning windows form question... Pin
Heath Stewart3-Feb-05 13:21
protectorHeath Stewart3-Feb-05 13:21 
GeneralSaving print settings Pin
object883-Feb-05 10:07
object883-Feb-05 10:07 
GeneralRe: Saving print settings Pin
Heath Stewart3-Feb-05 11:14
protectorHeath Stewart3-Feb-05 11:14 
GeneralRead detailed file descriptions(tags?) in c# Pin
Liu Shuai3-Feb-05 9:59
Liu Shuai3-Feb-05 9:59 
GeneralRe: Read detailed file descriptions(tags?) in c# Pin
Heath Stewart3-Feb-05 11:26
protectorHeath Stewart3-Feb-05 11:26 
While you can use an easy approach of interop'ing with shell32.dll (in VS.NET, add a reference to your project, click on the COM tab, and find "Microsoft Shell Controls and Automation") and using the Folder.GetDetailsOf method to get a property exposed to a column handler for that type. To get the right Folder, you can do something like this:
ShellClass shell = new ShellClass();
Folder folder = shell.Open("C:\path\My Music");
if (folder != null)
{
  FolderItem file = folder.Items(0);
  if (file != null)
    string artist = folder.GetDetailsOf(file, 4);
}
A better implementation is to get the IPropertySetStorage for the "\005SummaryInformation" storage stream, then use the IPropertySet to enumerate music properties (for example).

This requires quite a bit of knowledge about COM, COM interoperability with .NET (which is covered extensively in the .NET Framework SDK), and shell programming. I urge you to read the documentation for the two interfaces I previously mentioned before attempting this.

Why is this a better solution? The column handlers aren't gauranteed to be in a certain order and not every property is exposed through a column handler, so it limits your options. In may cases this may suit your needs, though. If you search for "GetDetailsOf" using the search feature of this site (the text box at the top of every page under the logo) you should be able to find a couple of articles that discuss this approach in more detail.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Read detailed file descriptions(tags?) in c# Pin
Liu Shuai3-Feb-05 12:06
Liu Shuai3-Feb-05 12:06 
QuestionStep into C++ COM object from C# .NET web service ? Pin
CherezZaboro3-Feb-05 8:56
CherezZaboro3-Feb-05 8:56 
AnswerRe: Step into C++ COM object from C# .NET web service ? Pin
Heath Stewart3-Feb-05 9:52
protectorHeath Stewart3-Feb-05 9:52 
GeneralRe: Step into C++ COM object from C# .NET web service ? Pin
CherezZaboro3-Feb-05 10:52
CherezZaboro3-Feb-05 10:52 
GeneralRe: Step into C++ COM object from C# .NET web service ? Pin
CherezZaboro3-Feb-05 10:52
CherezZaboro3-Feb-05 10:52 
GeneralRe: Step into C++ COM object from C# .NET web service ? Pin
Heath Stewart3-Feb-05 11:05
protectorHeath Stewart3-Feb-05 11:05 
GeneralRe: Step into C++ COM object from C# .NET web service ? Pin
CherezZaboro3-Feb-05 11:29
CherezZaboro3-Feb-05 11:29 
GeneralRe: Step into C++ COM object from C# .NET web service ? Pin
Heath Stewart3-Feb-05 13:19
protectorHeath Stewart3-Feb-05 13:19 
GeneralWeb control Pin
MyThread3-Feb-05 8:21
MyThread3-Feb-05 8:21 
GeneralRe: Web control Pin
Christian Graus3-Feb-05 8:34
protectorChristian Graus3-Feb-05 8:34 
GeneralRe: Web control Pin
MyThread3-Feb-05 10:14
MyThread3-Feb-05 10:14 
GeneralRe: Web control Pin
Christian Graus3-Feb-05 10:21
protectorChristian Graus3-Feb-05 10:21 
GeneralRe: Web control Pin
Charlie Williams3-Feb-05 8:38
Charlie Williams3-Feb-05 8:38 
GeneralRe: Web control Pin
MyThread3-Feb-05 10:12
MyThread3-Feb-05 10:12 
GeneralInfragistics Button Pin
Member 12502003-Feb-05 6:32
Member 12502003-Feb-05 6:32 
GeneralRe: Infragistics Button Pin
Christian Graus3-Feb-05 8:35
protectorChristian Graus3-Feb-05 8:35 
GeneralRe: Infragistics Button Pin
Anonymous3-Feb-05 9:26
Anonymous3-Feb-05 9:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.