Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
❔ Windows API message handling - C#
C
C#
•
3y ago
•
3 replies
Decimation
❔ Windows API message handling
I am working on this
(
https://github.com/Decimation/SmartImage
) program
. I am trying to work with Windows API messages for a few reasons
: clipboard listening
, drag
-and
-drop
, etc
. I have read the relevant documentation
(
https://learn.microsoft.com/en-us/windows/win32/api/_winmsg/
) and tried to get the P
/Invoke working but to no avail
. I have the relevant P
/Invoke in my referenced lib
(
https://github.com/Decimation/Novus
)
.
Most examples I come across reference
Windows Forms
Windows Forms
which I do not want to do for portability reasons
(I can use
OperatingSystem
OperatingSystem
and relevant C
# features to restrict Windows API calls to Windows platforms
)
, and I want to minimize unnecessary references in an already messy project
.
The specific messages I want to utilize are clipboard
(
https://learn.microsoft.com/en-us/windows/win32/dataxchg/using-the-clipboard
) and WM
_DROPFILES
(
https://learn.microsoft.com/en-us/windows/win32/shell/wm-dropfiles
)
.
What is the best way to use these API functions without referencing external libraries
?
GitHub
GitHub - Decimation/SmartImage: Reverse image search tool (SauceNao...
Reverse image search tool
(SauceNao
, ImgOps
, trace
.moe
, and more
)
- GitHub
- Decimation
/SmartImage
: Reverse image search tool
(SauceNao
, ImgOps
, trace
.moe
, and more
)
Windows and Messages - Win32 apps
Using the Clipboard - Win32 apps
This section has code samples for the following tasks
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Was this page helpful?
Yes
No
Similar Threads
Similar Threads
✅ Windows Joystick API
C
C# / help
3y ago
❔ error message windows form application
C
C# / help
3y ago
✅ Process API: Memory Leaks in Windows (?)
C
C# / help
13mo ago
Recommendation for handling logging in a API
C
C# / help
2y ago