WinApi
Ecng.Interop
Provides Windows API utility methods.
メソッド
GetScreenParams
public static void GetScreenParams(IntPtr hwnd, int left, int top, int width, int height)
WinApi.GetScreenParams(hwnd, left, top, width, height)
Retrieves the screen boundaries (left, top, width, height) for the screen that contains the specified window handle.
- hwnd
- The handle of the window.
- left
- Output parameter that returns the left coordinate of the screen.
- top
- Output parameter that returns the top coordinate of the screen.
- width
- Output parameter that returns the width of the screen.
- height
- Output parameter that returns the height of the screen.
UpdateAutoRun
public static void UpdateAutoRun(string appName, string path, bool enabled)
WinApi.UpdateAutoRun(appName, path, enabled)
Updates the auto-run registry entry for a given application.
- appName
- The name of the application.
- path
- The full path to the application executable.
- enabled
- True to enable auto-run; false to disable it.