windows-shell

ShellIconOverlayIdentifiers - why so few?

左心房为你撑大大i 提交于 2019-11-26 22:32:19
问题 At this point, everyone knows that there's a limit to the number of ShellIconOverlayIdentifiers (from MSDN): The number of different icon overlay handlers that the system can support is limited by the amount of space available for icon overlays in the system image list. There are currently fifteen slots allotted for icon overlays, some of which are reserved by the system. For this reason, icon overlay handlers should be implemented only if there are no satisfactory alternatives I can

How do I programmatically add a folder to the user's Favorites (in Windows Explorer)?

柔情痞子 提交于 2019-11-26 22:10:41
问题 I am looking for a way to programmatically add a folder to the Favorites in Windows Explorer. Its Windows Explorer specific and based around this project: http://www.codeproject.com/Tips/132804/Open-folders-using-a-Run-Command So far I've tried Process Monitor and searching the registry, but I can't seem to find my Windows Explorer Favourites in regedit . Microsoft has changed this in Windows 8 so I have tagged my question accordingly. Please see the comments in the marked answer for Win8 &

how to get file properties?

倖福魔咒の 提交于 2019-11-26 21:39:11
问题 I want an application which displays the some file properties of a mediafile if available, like (don't know the exact english words used in windows for it) FileName, Length/Duration, FileType(.avi .mp3 etc.) I tried taglib and windowsapishell but I dont get a working result (references are good) ShellFile so = ShellFile.FromFilePath(file); so.Properties.System.(everythingIwant) shows me a lot of file properties which I want to have displayed, but I cant get it working An example of an error:

How can I get monitors numbers from Screen Resolution dialog in win7 programmatically?

断了今生、忘了曾经 提交于 2019-11-26 20:27:26
问题 When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that? EnumDisplayDevices and GetMonitorInfo are not reliable anymore for that purpose in Windows 7. I tried GetMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \.\Display2) with no

Getting output from a shell/dos app into a Delphi app

让人想犯罪 __ 提交于 2019-11-26 16:01:58
I have a commandline application coded in delphi that I need to call from a normal desktop application (also coded in delphi). In short, I want to call the commandline app and display the text it outputs "live" in a listbox. It's been ages since I have played around with the shell, but I distinctly remember that in order to grab the text from a commandline app - I have to use the pipe symbol ">". Like this: C:/mycmdapp.exe >c:/result.txt This will take any text printed to the shell (using writeLn) and dump it to a textfile called "result.txt". But.. (and here comes the pickle), I want a live

ShellExecute equivalent in .NET

*爱你&永不变心* 提交于 2019-11-26 15:31:53
I'm looking for the .NET-preferred way of performing the same type of thing that ShellExecute does in Win32 (opening, printing, etc. for arbitrary file types). I've been programming Windows for over 20 years, but I'm a complete newbie at .NET, so maybe I'm just looking in the wrong places. I'm currently using .NET 2.0 (VS C# 2005), but could use VS 2008 if need be. If the only answer is to use P/Invoke, then I might be better just writing my small utility using Win32 anyway. Process.Start . Note that advanced uses (printing etc) require using a ProcessStartInfo and setting the Verb property.

Windows shell extension with C#

依然范特西╮ 提交于 2019-11-26 14:27:13
I was wanting to write a simple windows shell extension to add to the context menu, and C# is the language I most use these days. Is it a decent choice for a shell extension? Are the interfaces easy to get to with it? Is there additional overhead that causes the menu to be slower to pop up? Any one have good pointers for getting started? GSerg A Raymond's post: Do not write in-process shell extensions in managed code . A recent follow-up: Now that version 4 of the .NET Framework supports in-process side-by-side runtimes, is it now okay to write shell extensions in managed code? The bottom line

Programmatically select multiple files in windows explorer

淺唱寂寞╮ 提交于 2019-11-26 08:23:58
问题 I can display and select a single file in windows explorer like this: explorer.exe /select, \"c:\\path\\to\\file.txt\" However, I can\'t work out how to select more than one file. None of the permutations of select I\'ve tried work. Note: I looked at these pages for docs, neither helped. https://support.microsoft.com/kb/314853 http://www.infocellar.com/Win98/explorer-switches.htm 回答1: This should be possible with the shell function SHOpenFolderAndSelectItems EDIT Here is some sample code

Getting output from a shell/dos app into a Delphi app

ぃ、小莉子 提交于 2019-11-26 04:40:25
问题 I have a commandline application coded in delphi that I need to call from a normal desktop application (also coded in delphi). In short, I want to call the commandline app and display the text it outputs \"live\" in a listbox. It\'s been ages since I have played around with the shell, but I distinctly remember that in order to grab the text from a commandline app - I have to use the pipe symbol \">\". Like this: C:/mycmdapp.exe >c:/result.txt This will take any text printed to the shell

ShellExecute equivalent in .NET

微笑、不失礼 提交于 2019-11-26 04:28:14
问题 I\'m looking for the .NET-preferred way of performing the same type of thing that ShellExecute does in Win32 (opening, printing, etc. for arbitrary file types). I\'ve been programming Windows for over 20 years, but I\'m a complete newbie at .NET, so maybe I\'m just looking in the wrong places. I\'m currently using .NET 2.0 (VS C# 2005), but could use VS 2008 if need be. If the only answer is to use P/Invoke, then I might be better just writing my small utility using Win32 anyway. 回答1: Process