I want to Close, Minimize and Maximize my electron application from Javascript.
I tried it with this code. It worked for maximize and close but sometimes it's not working.
const { app } = require("electron");
const remote = require("electron").remote;
function closeApplication() {
window.close().method;
}
function maximizeWindow() {
// win.maximize();
// window.maximize();
window.moveTo(0, 0);
window.resizeTo(screen.width, screen.height);
}
function minimizeWindow() {
let window = remote.getCurrentWindow();
window.minimize();
}
Can anyone help me