C# 클래스 Sense.WinApi

파일 보기 프로젝트 열기: MrWindows/MrWindows

공개 메소드들

메소드 설명
CreateScreenshot ( ) : Bitmap
GetCursorPosition ( ) : Point
IsMouseLeftDown ( ) : bool
IsMouseLeftUp ( ) : bool
Logon ( ) : void
Logon2 ( ) : void
ManagedSendKeys ( string keys ) : void

simulates a keypress, see http://msdn2.microsoft.com/en-us/library/system.windows.forms.sendkeys(VS.71).aspx no winapi but this works just fine for me

ManagedSendKeys ( string keys, IntPtr handle ) : void

sends a keystring to a window

ManagedSendKeys ( string keys, string windowName ) : void

checks if the correct window is active, then send keypress

MouseLeftClick ( ) : void
MouseLeftDown ( ) : void
MouseLeftUp ( ) : void
MouseMiddleClick ( ) : void
MouseMove ( int x, int y ) : void
MouseRightClick ( ) : void
ScrollHorizontally ( int units ) : void
ScrollVertically ( int units ) : void
SendKeyboardEvent ( Keys key, int delay ) : void

sends a key to a window, pressing the button for x seconds

SendKeyboardEventDown ( VirtualKey key ) : void
SendKeyboardEventUp ( VirtualKey key ) : void
WindowActivate ( IntPtr handle ) : void
WindowActivate ( string windowName ) : void
WindowActive ( IntPtr myHandle ) : bool
WindowActive ( string windowName ) : bool
WindowMove ( int x, int y, string windowName ) : void
WindowMove ( int x, int y, string windowName, int width, int height ) : void

비공개 메소드들

메소드 설명
BitBlt ( IntPtr hObject, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hObjectSource, int nXSrc, int nYSrc, int dwRop ) : bool
CreateCompatibleBitmap ( IntPtr hDC, int nWidth, int nHeight ) : IntPtr
CreateCompatibleDC ( IntPtr hDC ) : IntPtr
DeleteDC ( IntPtr hDC ) : bool
DeleteObject ( IntPtr hObject ) : bool
DuplicateToken ( IntPtr ExistingTokenHandle, int SECURITY_IMPERSONATION_LEVEL, IntPtr &DuplicateTokenHandle ) : bool
FindWindow ( string lpClassName, string lpWindowName ) : IntPtr
FindWindowEx ( IntPtr hwndParent, IntPtr hwndChildAfter, String lpszClass, String lpszWindow ) : IntPtr
GetCursorPos ( POINT &lpPoint ) : bool
GetDesktopWindow ( ) : IntPtr
GetForegroundWindow ( ) : IntPtr
GetKeyState ( VirtualKey nVirtKey ) : short
GetWindowDC ( IntPtr hWnd ) : IntPtr
GetWindowRect ( IntPtr hWnd, System.Windows.Forms.RECT &rect ) : IntPtr
LockWorkStation ( ) : void
LogonUser ( string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr &phToken ) : bool
MoveWindow ( IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint ) : bool
ReleaseDC ( IntPtr hWnd, IntPtr hDC ) : IntPtr
SelectObject ( IntPtr hDC, IntPtr hObject ) : IntPtr
SendMessage ( IntPtr hwnd, MsgType uMsg, int wParam, int lParam ) : bool
SetCursorPos ( int x, int y ) : int
SetForegroundWindow ( IntPtr hWnd ) : bool
keybd_event ( byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo ) : void
mouse_event ( uint dwFlags, uint dx, uint dy, uint dwData, int dwExtraInfo ) : void

메소드 상세

CreateScreenshot() 공개 정적인 메소드

public static CreateScreenshot ( ) : Bitmap
리턴 System.Drawing.Bitmap

GetCursorPosition() 공개 정적인 메소드

public static GetCursorPosition ( ) : Point
리턴 Point

IsMouseLeftDown() 공개 정적인 메소드

public static IsMouseLeftDown ( ) : bool
리턴 bool

IsMouseLeftUp() 공개 정적인 메소드

public static IsMouseLeftUp ( ) : bool
리턴 bool

Logon() 공개 정적인 메소드

public static Logon ( ) : void
리턴 void

Logon2() 공개 정적인 메소드

public static Logon2 ( ) : void
리턴 void

ManagedSendKeys() 공개 정적인 메소드

simulates a keypress, see http://msdn2.microsoft.com/en-us/library/system.windows.forms.sendkeys(VS.71).aspx no winapi but this works just fine for me
public static ManagedSendKeys ( string keys ) : void
keys string the keys to press
리턴 void

ManagedSendKeys() 공개 정적인 메소드

sends a keystring to a window
public static ManagedSendKeys ( string keys, IntPtr handle ) : void
keys string
handle System.IntPtr
리턴 void

ManagedSendKeys() 공개 정적인 메소드

checks if the correct window is active, then send keypress
public static ManagedSendKeys ( string keys, string windowName ) : void
keys string keys to press
windowName string window to send the keys to
리턴 void

MouseLeftClick() 공개 정적인 메소드

public static MouseLeftClick ( ) : void
리턴 void

MouseLeftDown() 공개 정적인 메소드

public static MouseLeftDown ( ) : void
리턴 void

MouseLeftUp() 공개 정적인 메소드

public static MouseLeftUp ( ) : void
리턴 void

MouseMiddleClick() 공개 정적인 메소드

public static MouseMiddleClick ( ) : void
리턴 void

MouseMove() 공개 정적인 메소드

public static MouseMove ( int x, int y ) : void
x int
y int
리턴 void

MouseRightClick() 공개 정적인 메소드

public static MouseRightClick ( ) : void
리턴 void

ScrollHorizontally() 공개 정적인 메소드

public static ScrollHorizontally ( int units ) : void
units int
리턴 void

ScrollVertically() 공개 정적인 메소드

public static ScrollVertically ( int units ) : void
units int
리턴 void

SendKeyboardEvent() 공개 정적인 메소드

sends a key to a window, pressing the button for x seconds
public static SendKeyboardEvent ( Keys key, int delay ) : void
key Keys
delay int
리턴 void

SendKeyboardEventDown() 공개 정적인 메소드

public static SendKeyboardEventDown ( VirtualKey key ) : void
key VirtualKey
리턴 void

SendKeyboardEventUp() 공개 정적인 메소드

public static SendKeyboardEventUp ( VirtualKey key ) : void
key VirtualKey
리턴 void

WindowActivate() 공개 정적인 메소드

public static WindowActivate ( IntPtr handle ) : void
handle System.IntPtr
리턴 void

WindowActivate() 공개 정적인 메소드

public static WindowActivate ( string windowName ) : void
windowName string
리턴 void

WindowActive() 공개 정적인 메소드

public static WindowActive ( IntPtr myHandle ) : bool
myHandle System.IntPtr
리턴 bool

WindowActive() 공개 정적인 메소드

public static WindowActive ( string windowName ) : bool
windowName string
리턴 bool

WindowMove() 공개 정적인 메소드

public static WindowMove ( int x, int y, string windowName ) : void
x int
y int
windowName string
리턴 void

WindowMove() 공개 정적인 메소드

public static WindowMove ( int x, int y, string windowName, int width, int height ) : void
x int
y int
windowName string
width int
height int
리턴 void