WindowFromPoint malfunctions for x64 WPF application.
See original GitHub issue- .NET Core Version: (6.0.202)
- Windows version: (Windows 11 21H2)
- Does the bug reproduce also in WPF for .NET Framework 4.8?: Test for 4.7.1 reproduced successfully.
Problem description:
Native function WindowFromPoint
cannot be used to obtain handle to windows in x64 WPF application.
When attempting to get a window from .NET WPF process(no matter it’s a remote process or the current process), it returns the ‘background’ window as if the WPF window does not exist.
This problem disappeared if PlatformTarget
property in ‘.csproj’ file is set to x86(default x64 in the following project).
Minimal repro: WpfApp1.zip in which is a draggable cross. Dragging the cross to any point at the window itself does not work.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
c# - WindowFromPoint doesn't work correctly on 64bit .NET ...
Windows XP Pro 64 bit - running 32 bit app WindowFromPoint takes 2 32 bit integers off the stack regardless of what the...
Read more >WindowFromPoint in 64Bit application
Hi, I have an application which running smoothly in 32bit, but my client now requested it make it as 64bit. So i've gone...
Read more >WPF Apps crash on Windows 10/11 after ...
My Windows 11 dev system installed updates last night, and today when I run any of our WPF apps (either under the Visual...
Read more >MouseGetPos fails in Visual Studio - Ask for Help
In the main (code) window of Visual Studio 2010 I get an empty handle from both methods of MouseGetPos. The DllCall does return...
Read more >Microsoft Known Issues
Microsoft often releases patches to address security and reliability issues. Sometimes, patches itself will introduce unprecedented issues after installing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. Problem solved.
It’s a modified game, running in .NET 6 x64.