GithubHelp home page GithubHelp logo

vebin / winapi-wrapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lazocoder/winapi-wrapper

0.0 3.0 0.0 158 KB

Windows API wrapper class for simulating mouse movement, clicking, and more.

License: GNU General Public License v3.0

C# 100.00%

winapi-wrapper's Introduction

WinAPI-Wrapper

Windows API wrapper class for simulating mouse movement, clicking, window manipulation and more...

API

The following is a summary of some of the methods that are available. There are more methods and classes than what is listed below but the purpose is to give a rough idea of what the wrapper can do. To see more details on what a particular methods does and what the parameters are, please take a look at the code itself as it is well commented.

Mouse.cs

public static void LeftClick();
public static void RightClick();
public static void MiddleClick();

public static void LeftDown();
public static void LeftUp();

public static void RightDown();
public static void RightUp();

public static void MiddleDown();
public static void MiddleUp();

public static void Move(int x, int y);
public static void LeftDrag(Point point1, Point point2, int interval, int lag);

Window.cs

public static bool DoesExist(string windowTitle);
public static IntPtr Get(string windowTitle);

public static IntPtr GetFocused();
public static void SetFocused(IntPtr hWnd);
public static bool IsFocused(IntPtr hWnd);

public static void Move(IntPtr hWnd, int x, int y);
public static void Resize(IntPtr hWnd, int width, int height);
public static void Hide(IntPtr hWnd);
public static void Show(IntPtr hWnd);

public static Rectangle GetDimensions(IntPtr hWnd);
public static Size GetSize(IntPtr hWnd);
public static Point GetLocation(IntPtr hWnd);
public static string GetTitle(IntPtr hWnd);
public static void SetTitle(IntPtr hWnd, string title);

public static void Maximize(IntPtr hWnd);
public static void Minimize(IntPtr hWnd);
public static void Normalize(IntPtr hWnd);

public static Bitmap Screenshot(IntPtr hWnd);

public static void RemoveMenu(IntPtr hWnd);
public static void Close(IntPtr hWnd);

public static void DisableCloseButton(IntPtr hWnd);
public static void DisableMaximizeButton(IntPtr hWnd);
public static void DisableMinimizeButton(IntPtr hWnd);

public static void EnableMouseTransparency(IntPtr hWnd);
public static Point ConvertToWindowCoordinates(IntPtr hWnd, int x, int y);
public static Point GetCoordinateRelativeToWindow(IntPtr hWnd);

Desktop.cs

public static Bitmap Screenshot();
public static void HideTaskBar();
public static void ShowTaskBar();
public static int GetWidth();
public static int GetHeight();

Usage

Compiling the code in the WindowsAPI folder produces a .dll file. Any C# code that references this .dll can utilize the wrapper.

winapi-wrapper's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.