Questions tagged [windows-api-code-pack]

The Windows API Code Pack for .NET is esentially a managed API to access Shell functions, that are otherwise not available for .NET Developers.

The Windows API Code Pack for .NET can either be downloaded from MSDN or installed via NuGet with Install-Package Windows7APICodePack.

170 questions
120
votes
6 answers

Windows API Code Pack: Where is it?

Why has itself and the evidence it ever existed been removed? Only a half year ago it was promoted on channel9 as Something that should be in everyones pack -- today the Microsoft Archive is "retired" and totally keeps quiet that the API code pack…
springy76
  • 3,706
  • 2
  • 24
  • 46
20
votes
3 answers

How can I make CommonOpenFileDialog select folders only, but still show files?

I am using Microsoft's CommonOpenFileDialog to allow users to select a Folder, but no files are visible when the dialog comes up. Is it possible to show files as well as folders when IsFolderPicker is set to true? My current code looks like this var…
Rachel
  • 130,264
  • 66
  • 304
  • 490
20
votes
2 answers

CommonOpenFileDialog cause Windows Form to shrink

I've been working on a Windows Forms application, and have recently added a simple settings page that allows the user to select a folder for where the output goes. The OpenFileDialog is ugly and not nice to use, so I've added in the…
zmh
  • 201
  • 2
  • 4
13
votes
4 answers

Accessing thumbnails that don't exist

I have made an application that presents you a list of files in your computer. Whenever you click any item in the list, a small PictureBox next to it should show the thumbnail of the corresponding file. I am using C# on Windows 7. To obtain the…
12
votes
2 answers

how to get file properties?

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…
11
votes
1 answer

How to use ilMerge to merge dll’s into an exe file?

I tried: C:\Windows\System32>ilmerge /target:winexe /out:c:\output.exe c:\MyProgram.exe c:\Microsoft.WindowsAPICodePack.dll But got: 'ilmerge' is not recognized as an internal or external command, operable program or batch file. What am I doing…
Anonymous
  • 123
  • 1
  • 1
  • 4
11
votes
2 answers

Name of files opened by a process in window?

How to print name of file open by some process (PID) in window? Or All Processes (PID) currently open a file. Process Explorer is a utility works for same. But how does it work not mentioned? Any /proc filesystem kind of thing present in…
Grijesh Chauhan
  • 57,103
  • 20
  • 141
  • 208
10
votes
2 answers

What is the .NET 5 way of working with the Windows Shell?

I recently moved some of my software projects to .NET 5. I use the Microsoft WindowsAPICodePack to work with the Windows Shell, but this library is getting old and does not seem to be maintained anymore. Also, it's compiled for .NET Framework 4.7 or…
Daap
  • 345
  • 4
  • 10
8
votes
1 answer

Windows API Codepack Backwards Compatibility on Windows XP

I don't have an XP machine handy. If I use the Windows API Codepack to do something new to Vista/Win7 (e.g. "TaskDialog") in C#, how does it cope with running on Windows XP machines? If I use the Codepack, have I effectively made my application…
Neil Barnwell
  • 41,080
  • 29
  • 148
  • 220
7
votes
3 answers

TaskDialog fires exception: comctl32.dll in version 6 required

I´m developing a modern WPF application. I want to use the TaskDialog, but I always get the common error: TaskDialog feature needs to load version 6 of comctl32.dll but a different version is current loaded in memory. I tried to add a manifest…
SharpShade
  • 1,761
  • 2
  • 32
  • 45
7
votes
2 answers

Checking if the file is in use and by which application?

Trying to use the below mentioned approach to get more details about the locked file. Is file in use function GetFileInUseInfo(const FileName : WideString) : IFileIsInUse; var ROT : IRunningObjectTable; mFile, enumIndex, Prefix : IMoniker; …
fr21
  • 1,746
  • 7
  • 26
  • 45
6
votes
1 answer

How to remove background color of ShellFile “icons”, but not of “real” thumbnails

I’m using WindowsAPICodePack, getting ShellFile’s Thumbnail’s. But some of those which look like the generic icons – have a black background. I therefore make it a Bitmap and set Black as transparent. The problem is that when it’s a thumbnail of a…
ispiro
  • 26,556
  • 38
  • 136
  • 291
6
votes
4 answers

ByRef vs. ByVal for the ReadProcessMemory function

I'm using the windows function ReadProcessMemory in VBA/VB6 and I don't understand why when I change the passing mechanism of lpBuffer to ByVal the function still modifies the value of the original object passed through this argument. In the…
Stavm
  • 7,833
  • 5
  • 44
  • 68
6
votes
2 answers

Is it possible to set/edit a file extended properties with Windows API Code Pack?

I'd like to know if it's possible to set/edit a file extended properties (Explorer: Right-click > Properties > Details) using the Windows API Code Pack. var shellFile = Microsoft.WindowsAPICodePack.Shell.ShellObject.FromParsingName(filePath); var…
Kaze
  • 101
  • 1
  • 6
6
votes
3 answers

Windows API Code Pack - ShellFile not generating PDF bitmap

Using the code from previous stack overflow questions: System.Drawing.Bitmap image; ShellFile f = ShellFile.FromFilePath(fileLocation); image = f.Thumbnail.ExtraLargeBitmap; image.Save(tempfile, ImageFormat.Png); I am trying to use window API to…
Alex C
  • 16,624
  • 18
  • 66
  • 98
1
2 3
11 12