Skip to content

SetWindowsHookEx API is not working for mouse actions in .NET7.0 #10173

@GokulThanu

Description

@GokulThanu

.NET version

.net7.0

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

It works in .net6.0 and earlier versions

Issue description

The mouse action is not captured by the SetWindowsHookEx API in .Net7.0 which works in the earlier version.

I have already created an issue regarding this but the solution given is not working in framework 4.8 versions. It shows the error" Native sized interger is not available in c#". Please find the old issue link

#9535.

Steps to reproduce

Sample

WindowsFormsApp1.zip

  • Run the sample
  • Note that the compilation error occurs

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-author-feedbackThe team requires more information from the author

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions