設置窗口默認最大化、全屏(electron)


一、默認最大化

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

二、默認全屏

win = new BrowserWindow({fullscreen: true})

參考:

  1. https://electronjs.org/docs/api/browser-window#browserwindow-setfullscreen-flag
  2. https://github.com/electron/electron/issues/7076
  3. https://stackoverflow.com/questions/39062131/electron-set-fullscreen-onclick


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM