简体   繁体   中英

How to check if LeftClick is pressed C#

I need to check if a user has left click being held anyone know how I would need to accomplish this?

I already tried messing around with System.Windows.Input but I couldn't figure it out

This is a windows forms app but I need it to work outside of the form I prefer a simpler answer

Alot of useful answers on Stack overflow. Try this >> c# Detect mouse clicks anywhere (Inside and Outside the Form)

This should allow you to detect left clicks in or outside your program. If you want an event for a control in your form, try the.Click event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM