How to open up the index.js as Maximized?


#1

I want my app opend up occupying all the screen space like a lot of desktop apps do.

I have tried to set the BrowserWindow option as {fullscreen:true} when create the browserWindow object, but in this case, it’s like the fullscreen mode in a web browser, which hide the app title bar.

Then I tried the method of BrowserWindow.maximize(); It worked fine, but everytime when I open my app, it will at first create a small window and then maximize it to the position I want. The transition is noticable.

So, is there a method to open a window directly as maximized?
Thanks


#2

Have you tried using the screen module to get the screen size before initialising a BrowserWindow, and then using the screen dimensions explicitly as the width and height of the window?


#3

Not yet, I will try it. Thank you!