Window Form using Node.js | Sololearn: Learn to code for FREE!


Window Form using Node.js

Hello all, is there any possibility that I can make window form using Node.js which will be draw on other applications of Windows?

8/1/2021 9:39:56 AM

Hamdan Farooq

12 Answers

New Answer


Yes, you could build window desktop applications using electron.js Electron.js allows for the development of desktop GUI applications using web technologies: it combines the Chromium rendering engine and the Node.js runtime.


Hamdan Farooq ipcMain is the interprocess communication method between election app and web pages, which is different from what interprocess that Martin Taylor has mentioned.


Hamdan Farooq Follow the following steps to setup a basic desktop application using election.js. // Quickstart of simple electron app // commands to run to setup electron package in node.js npm init -y npm i -D electron // modified package.json "main": "main.js" "script": { "start": "electron ." } // create index.htmk and add content in // run electron app from main.js import {app, BrowserWindow} = require(electron); app.whenReady.then(() => { const win = new BrowserWindow({ width: 800, height: 600 }); win.loadFile('index.html'); }); // to compile the desktop application, run command npm start


What you are asking to do us not possible using node.js. The solution proposed by Calvin will create an application but it will not draw on other applications or windows. It will exist only within its own window. Each application exists within its own process. Without using interprocess communications one application cannot effect the device context of another application. Or am I taking the meaning of your expression "draw on other applications of Windows" too literally?


I can't imagine why you would want to use Node over C# for winforms...


I never said I will use node over c# I am working with react.js node.js and react native also. And currently I am doing demo project for more practicing that is why I am asking. Aleksei Radchenkov


Oh ok, you surely can make .net app that connects to


Aleksei Radchenkov Thank you.


Martin Taylor you are saying right I have found ipcMain (for the communication)


Calviղ Thank you


Calviղ thanks I was searching for interprocess communication and I misunderstood ipcMain.


Thanks Calviղ. My application has been completed the only thing that I am struggling on now is to activate mouse event true when pressing any key (in my case is 'z') and disabling mouse Event on pressing key(in my case is 'x').