C# Class Yodiwo.Tools.WindowsNative

显示文件 Open project: yodiwo/plegma

Public Methods

Method Description
CreateShortcut ( string targetPath, string shortcutPath ) : void
GetMousePosition ( ) : Win32Point
SendKeyDown ( KeyCode keyCode ) : void

Send a key down and hold it down until sendkeyup method is called

SendKeyPress ( KeyCode keyCode ) : void

simulate key press

SendKeyUp ( KeyCode keyCode ) : void

Release a key that is being hold down

Private Methods

Method Description
FindWindow ( string lpClassName, String lpWindowName ) : int
GetCursorPos ( Win32Point &pt ) : bool
GetDesktopWindow ( ) : IntPtr
LoadLibrary ( string librayName ) : IntPtr
PeekMessage ( Message &msg, IntPtr hWnd, uint messageFilterMin, uint messageFilterMax, uint flags ) : bool
PostMessage ( IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam ) : int
SendInput ( uint numberOfInputs, INPUT inputs, int sizeOfInputStructure ) : uint
SendMessage ( IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam ) : int
SetCursorPos ( int X, int Y ) : bool
SetParent ( IntPtr hWndChild, IntPtr hWndNewParent ) : IntPtr

Method Details

CreateShortcut() public static method

public static CreateShortcut ( string targetPath, string shortcutPath ) : void
targetPath string
shortcutPath string
return void

GetMousePosition() public static method

public static GetMousePosition ( ) : Win32Point
return Win32Point

SendKeyDown() public static method

Send a key down and hold it down until sendkeyup method is called
public static SendKeyDown ( KeyCode keyCode ) : void
keyCode KeyCode
return void

SendKeyPress() public static method

simulate key press
public static SendKeyPress ( KeyCode keyCode ) : void
keyCode KeyCode
return void

SendKeyUp() public static method

Release a key that is being hold down
public static SendKeyUp ( KeyCode keyCode ) : void
keyCode KeyCode
return void