Horje
c# getasynckeystate mouse Code Example
c# getasynckeystate mouse
[DllImport("user32.dll")]
static extern short GetAsyncKeyState(int VirtualKeyPressed);
 
public static bool GetLeftMousePressed()
    {
        if (GetAsyncKeyState(0x01) == 0)
            return false;
        else
            return true;
    }

// 0x01 stands for left Mouse click
// for different Virtual-Keys view list:
// https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

Credit: Jason Wong on Stack Overflow




Csharp

Related
get program path c# Code Example get program path c# Code Example
unity right click on gameobject Code Example unity right click on gameobject Code Example
c# list to string Code Example c# list to string Code Example
setup authorize in swagger .net core Code Example setup authorize in swagger .net core Code Example
unity serializefield Code Example unity serializefield Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12