取得鼠标位置

using System.Runtime.InteropServices;

       [System.Runtime.InteropServices.DllImport( 
"user32.dll" , EntryPoint="GetCursorPos" )] 
       
public extern static int GetCursorPos( ref POINTAPI lpPoint ); 

public struct POINTAPI 

     
public int x; 
    
public int y; 
}
 
        
POINTAPI _POINTAPI 
= new POINTAPI(); 
GetCursorPos ( 
ref _POINTAPI ); 
原文地址:https://www.cnblogs.com/wy/p/197137.html