Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron Take Up 100% Of Screen (Not Full Screen)

Tags:

electron

People also ask

How do you make an electron window full screen?

To make an Electron app run in full-screen mode when it's started, pass the following configuration option when creating the BrowserWindow instance: mainWindow = new BrowserWindow({fullscreen: true});

What is Electron kiosk mode?

Kiosk mode is a common way to lock down a Windows device when that device is used for a specific task or used in a public setting. So in electron kiosk mode, we'd have the ability to lock down our application to a point that users are restricted to the actions that we want them to perform.


use this!

win = new BrowserWindow({show: false});
win.maximize();
win.show();

Call mainWindow.maximize() to maximize the window after you create it.


Use this:

const electron = require('electron')
const { app, BrowserWindow } = electron

let win

app.on('ready', () => {
   const {width, height} = electron.screen.getPrimaryDisplay().workAreaSize
   win = new BrowserWindow({width, height})
   win.loadURL('https://github.com')
})

I used this:

function createWindow () {
  // Create the browser window.
  win = new BrowserWindow({
    show: false,
    webPreferences: {
      nodeIntegration: true
    }
  });

  win.maximize();
  win.show();
}

Which is basically what others have said before