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
1
vote
1 answer

TaskDialog default button

stackoverflow just works faster :) I'm using the Windows® API Code Pack for Microsoft® .NET Framework to access Windows 7 API and I want to change my old MessageBox to TaskDialog. One thing I cannot find is the default button of the dialog. Is…
sebagomez
  • 9,501
  • 7
  • 51
  • 89
1
vote
1 answer

read/capture Windows pop-up message in vb6?

Problem: Need to read/capture the text of Windows pop-up messages that is generated by non-VB applications. Situation: I've a VB6 app, part of which requires processing an excel workbook. A non vb-6 pop-up window (as attached screen) "FILE…
Kings
  • 1,551
  • 12
  • 32
  • 52
1
vote
0 answers

Integrating Windows-API-Code-Pack in Outlook Add-In - Manifest unselectable

I need to use the TaskDialog provided by the Windows API Code Pack in my Outlook Add-In. I recived this error: TaskDialog feature needs to load version 6 of comctl32.dll but a different version is current loaded in memory. I followed the steps…
1
vote
1 answer

Customize CommonFileDialog to Folder and File Picker

I'm trying to make a File and Folder dialog in C#. (Just a warning: I will downvote ALL FolderBrowserDialog suggestions. That dialog is an abomination of nature) Currently I'm using the CommonOpenFileDialog found in the WindowsApiCodePack, which has…
AkselK
  • 2,563
  • 21
  • 39
0
votes
1 answer

Strange issue with shell extesnsions.File returns after delete

I am having a strange problem.I am using the Windows API Code Pack for Microsoft .NET Framework for displaying custom thumbnails for my custom file extensions.I have used the Microsoft.WindowsAPICodePack.ShellExtensions namespace methods as…
biju
  • 17,554
  • 10
  • 59
  • 95
0
votes
0 answers

Use a ShellFile object using Windows API Code Pack for Microsoft

Windows API Code Pack for Microsoft can be downloaded from here. That is a really nice library and it has great examples. For example if I open the solution WindowsAPICodePack10 that comes in the zip from downloading the code pack (it only contains…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
0
votes
1 answer

Unable to call Close on Window using a ThumbnailToolBarButton

I am trying to close a Window in a brand new WPF application (no changes to the default generated xaml) via button click of a ThumbnailToolBarButton. When I try to do so, I am presented with the following error: System.InvalidOperationException…
0
votes
0 answers

GetClipboardData from Windows API sometimes does not return the copied text

I use VBA and Windows API to navigate through an read only text box control of a program. I can retrieve each value in the textbox by copying it using Ctrl + C and read the clipboard. Here is my code: Private Declare PtrSafe Function OpenClipboard…
Lv Linh
  • 31
  • 3
0
votes
0 answers

C++ Windows Service User Logoff using WIN API

Sorry for my English, it might be a bit wonky due to Dyslexia. Working on a project using only pure C++ and windows API to make a service. If situation X happens, I want it log the user out of windows. BOOL EmergencyShutdown() { HANDLE hToken; …
0
votes
0 answers

VBA Access MouseHook Wrapper

So, my main goal is to be able to move / resize the main access window along with a popup form, that is, when the main form is moved/resized, i want the main window to follow. So, with the help of some online code and chatgpt i've narrowed it down…
0
votes
0 answers

Access violation when setting Windows Tags

I have a C# all platforms console app to set Windows tags. It is created using VS2022 with code as shown below using Microsoft.WindowsAPICodePack.Shell; class TestClass { static void Main(string[] args) { // Display arguments. …
SimonKravis
  • 553
  • 1
  • 3
  • 24
0
votes
0 answers

Is it possible to execute the "Auto-hide the taskbar" feature using the Windows API?

I am trying to manipulate the auto-hide taskbar feature in Windows 11 using C language. I want to enable auto-hide when using the laptop alone, and disable it when connecting a monitor via C-type. However, when I wrote and executed the code as shown…
tojaman
  • 1
  • 1
0
votes
0 answers

C# - Using my Windows Forms (not in focus) to send keystrokes to another application (in focus)

I want to write a program in C# where I first set a hotkey and then start it by button. After that I want to tab into a game (focus on the game) and press my hotkey in the game. This should be recognized by my Windows Forms and then send keystrokes…
goat
  • 9
  • 1
0
votes
0 answers

Error "Package 'WindowsAPICodePack 7.0.4' was restored using '.NETFramework..." for a NET6 package

I have a .NET Standard 2.0 project which depends on another project targeting "net6.0-windows;net48". The other project uses a NET6 WindowsAPICodePack Nuget package. When I build the solution, the other project builds fine but the depending project…
Val
  • 1,548
  • 1
  • 20
  • 36
0
votes
0 answers

WinUsb_Initialize always get 0 and error 31

I use python and refer to the following website to modify the…