Skip to content Skip to sidebar Skip to footer

How To Make Window Size Responsive In Electron. (On The Opening Of The App)

I recently started making an app on Electron, I wanted to make the window responsive, for example, if I open app on different screens it should open in full-size according to the s

Solution 1:

After creating your BrowserWindow you should call maximize()

mainWindow1 = new BrowserWindow();
mainWindow1.loadFile(htmlPath);
mainWindow1.maximize();

https://electronjs.org/docs/api/browser-window#winmaximize


Post a Comment for "How To Make Window Size Responsive In Electron. (On The Opening Of The App)"