win-setwindowpos
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

SetWindowPos

Build Status

Node package wrapping SetWindowPos from winapi User32.dll

Requirements

  • Windows
  • Node 10.x or newer

Installation

npm i win-setwindowpos

Usage

SetWindowPos is designed to be used with electron (altough it can be used without it).

const { 
  SetWindowPos,
  HWND_BOTTOM,
  SWP_NOACTIVATE,
  SWP_NOSIZE,
  SWP_NOMOVE
} = require('win-setwindowpos');
let window;

function createConfigWindow() {
  window = new BrowserWindow({
    // BrowserWindow parameters
  });
  // window setup
  const hwnd = window.getNativeWindowHandle();
  SetWindowPos(
    hwnd,
    HWND_BOTTOM,
    0,
    0,
    0,
    0,
    SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE
  );
}

Package Sidebar

Install

npm i win-setwindowpos

Weekly Downloads

7

Version

2.1.0

License

ISC

Unpacked Size

369 kB

Total Files

13

Last publish

Collaborators

  • jaroslawpokropinski