본문 바로가기

C#/WindowsAPI

(6)
C# 절전모드 / 최대 절전모드 절전모드 / 최대 절전모드 [DllImport("Powrprof.dll", CharSet=CharSet.Auto, ExactSpelling=true)] public static extern bool SetSuspendState(bool hiberate, bool forceCritical, bool disableWakeEvent); // Hibernate SetSuspendState(true, true, true); // Standby SetSuspendState(false, true, true);
C# 키보드 인풋 키보드 인풋 public class Keyboard { public static void Send(ScanCodeShort a) { INPUT[] Inputs = new INPUT[1]; INPUT Input = new INPUT(); Input.type = 1; // 1 = Keyboard Input Input.U.ki.wScan = a; Input.U.ki.dwFlags = KEYEVENTF.SCANCODE; Inputs[0] = Input; SendInput(1, Inputs, INPUT.Size); } /// /// Declaration of external SendInput method /// [DllImport("user32.dll")] internal static extern uint Sen..
C# 마우스 인풋 API Using the Windows API to emulate hardware input in C# https://www.chriswirz.com/software/using-windows-api-to-emulate-user-input-in-c-sharp Using the Windows API to emulate hardware input in C# C# is managed code, but parts of the Windows API were built before the introduction of C#. Fortunately, there are InteropServices to call the API www.chriswirz.com
C# 마우스 커서 Cursor Show / Hide 마우스 커서 Cursor Show / Hide [DllImport("user32.dll")] static extern int ShowCursor(bool bShow); ShowCursor(false);
C# 프로그램 최상위 활성화 ForegroundWindow 프로그램 최상위 활성화 http://story0111.tistory.com/44 ④ C# 프로젝트 -1 프로그램명으로 프로그램 최상위로 활성화시키기(윈도우 전역) == Activate the top 프로그램명으로 최소화나 다른 프로그램이 활성화 되어있을때 최상위로 활성화 시켜주는 소스입니다. 예로 버튼을 만들어서 버튼을 누를때 최상위로 올라오도록했습니다. 다른 방법으로 단축� story0111.tistory.com 1. 프로그램 이름을 사용하는 방법 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using S..
C# Windows API 참고사이트 Windows API 참고사이트 http://www.pinvoke.net/index.aspx