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
2
votes
0 answers

Can't Get WindowsApiCodePack ShellFile Thumbnail Async

I am trying to get the thumbnails for files in a directory asynchronously. All files except PDFs seem to work async. if (System.IO.File.Exists(filePath)) { var task = await Task.Factory.StartNew(async () => { using(ShellFile…
KenWin0x539
  • 329
  • 3
  • 8
2
votes
1 answer

Get thumbnail of Network DWG file by Windows API Code Pack

I use the below code to get the DWG file thumbnail using the Windows API Code Pack: ShellFile shellFile = ShellFile.FromFilePath(mediaInfo.Filename); return shellFile.Thumbnail.LargeBitmap; But this works for local DWG files only, and returns the…
Murat Korkmaz
  • 1,329
  • 2
  • 19
  • 37
2
votes
0 answers

Windows taskbar thumbnail+buttons does not show up at same time

I'm trying to use Windows API Code Pack to show up image and buttons in taskbar preview image. I have read a bunch of tutorials, but still I can't get this working. Problem is that if I only set image, it shows fine, or if I just set buttons without…
darx
  • 1,417
  • 1
  • 11
  • 25
2
votes
0 answers

Extract/generate thumbnail of MS Office document if "Save Thumbnail" not selected C#

I am able to successfully extract thumbnails from files using the Windows API Code Pack: Bitmap shellThumb = sf.Thumbnail.ExtraLargeBitmap; where sf is a ShellFile. This works for all files that have a thumbnail generated. But, for example, if a…
sim1
  • 457
  • 1
  • 7
  • 26
2
votes
2 answers

How to retrieve the 'Deletion Date' property of an Item stored in the Recycle Bin using Windows API Code Pack?

UPDATE 2 Finally testing most of the WindowsAPICodePack interfaces I've found bymyself the way to acces to the deleted Files on the RecycleBin. The unique problem now is that I need to know how to acces the required property bag to retrieve the…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
2
votes
2 answers

Visual Basic .net Type 'ShellFile' is not defined

Dim shellFile__1 As ShellFile = ShellFile.FromFilePath(pathToYourFile) Dim shellThumb As Bitmap = shellFile__1.Thumbnail.ExtraLargeBitmap I am a huge noob with programming. I only have a little experience with visual basic. I am trying to use these…
Stoopkid
  • 1,885
  • 2
  • 17
  • 30
2
votes
1 answer

Windowless Taskbar Button

I would like to create a windowless taskbar button, just like Windows Live Messenger does it: How can I do that in C#? The Windows API Code pack looks helpful, but I haven't found any way to create a taskbar button with it.
main--
  • 3,873
  • 1
  • 16
  • 37
2
votes
3 answers

How to set a window property through the Windows API (VARIANT_TRUE)?

I'm working on Windows 8 and I want to try to disable the default edge gesture behaviors when my desktop app is fullscreen. I've found this page which explains how to do it in C++. My app is a WPF/C# application and I've found the Windows Code API…
Max
  • 1,810
  • 3
  • 26
  • 37
2
votes
1 answer

Application Restart API not restarting failed application

I'm trying to use the application restart services in Microsoft.WindowsAPICodePack.ApplicationServices, however the restart isn't working. When the application quits due to an unhandled exception it isn't restarted. I've tried with both a Click…
HolySamosa
  • 9,011
  • 14
  • 69
  • 102
2
votes
2 answers

Best way to set BIG IEnumerable as ListBox.ItemSource

I'm trying to use a Microsoft.Windows.APICodePack.Shell.ShellContainer as ItemsSource for a ListBox, showing each child's (ShellObject) Thumbnail and Name via ListBox.ItemTemplate. The problem arises when ShellContainer refers to a VERY BIG folder…
italianogrosso
  • 475
  • 1
  • 4
  • 12
2
votes
1 answer

InvalidOperationException in CommonSaveFileDialog of WindowsAPICodePack

I'm using CommonSaveFileDialog of WindowsAPICodePack in WPF to ask the user for a filename. In order to check the filename before the dialog is closed, I have a handler for FileOk. But if I try to get the FileName property, there is an…
MTR
  • 1,690
  • 3
  • 20
  • 47
1
vote
1 answer

Microsoft's CopyFileEx error

I am using Microsoft's CopyFileEx method to copy files. I am coping from one server to another and the file located in share folder and i am using UNC. i get an error 999. I was able to find the ‘999’ error on Microsoft’s Technet site. The copies…
MoShe
  • 6,197
  • 17
  • 51
  • 77
1
vote
0 answers

Screenshot for video files

I am trying to create screenshots of a powerpoint presentation using mij application. This is not the biggest issue. I have managed to do so with the following code Bitmap memoryImage = new Bitmap(rc.Width, rc.Height, …
Hippity
  • 23
  • 4
1
vote
0 answers

Why are there different Versions of Microsoft.WindowsAPICodePack in NuGet and what is the right one

In one of my older projects, I use the Microsoft.WindowsAPICodePack-Shell (and -Core) package (1.1.0.2) from Microsoft. I wanted to include these packages in one of my current project, only to find a lot of veeery similar looking packages…
Aaginor
  • 4,516
  • 11
  • 51
  • 75
1
vote
1 answer

VBA Parse through handles with same name using windows API

I am trying to automate a web based application using a simple VBA Macro. First of all it is for a company that I work for, hence the Application is in secured citrix environment. I launch it using "App Launcher" program. I was trying my hand to use…
aditya lele
  • 95
  • 1
  • 7