+ 1
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?
13 Antworten
+ 5
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.
+ 4
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.
+ 3
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
https://code.sololearn.com/ca9a6a20A5A1/?ref=app
+ 1
I can't imagine why you would want to use Node over C# for winforms...
+ 1
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
+ 1
Oh ok, you surely can make .net app that connects to socket.io:
https://www.google.com/amp/s/bitstobrowser.wordpress.com/2015/12/18/connecting-a-node-app-using-socket-io-to-a-windows-forms-net-client-application/amp/
+ 1
Aleksei Radchenkov Thank you.
+ 1
Martin Taylor you are saying right I have found ipcMain (for the communication)
0
Calviղ Thank you
0
Calviղ thanks I was searching for interprocess communication and I misunderstood ipcMain.
0
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').
0
@Hamdan Farooq, I am also working on the same thing I want to call my C# classes code behind Electron UI. Can you help me out?