We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Desktop Electron App Help

Home Forums Programming Desktop Electron App Help

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46362
    jdhutchinson
    Customer

    Hi, how can I make a ‘true’ fullscreen app with the electron method? So far, I have been able to use the F11 key to toggle fullscreen, OR use the verge3d advice to remove the menu in the main.js file.

    How can I get the best of both worlds, or run the exe that is made in a kiosk style mode.

    Also, is it in theory possible to ‘update’ the app by replacing and tweaking files in the \resources\app folder, which appears to just be a clone of a projects folder in the App Manager.

    • This topic was modified 1 month, 1 week ago by jdhutchinson.
    • This topic was modified 1 month, 1 week ago by jdhutchinson.
    • This topic was modified 1 month, 1 week ago by jdhutchinson.
    #46368

    Hi,

    you can do it as shown here
    https://www.electronjs.org/docs/latest/api/frameless-window

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #46370
    jdhutchinson
    Customer

    Hi Yuri,

    It seems the key line of code to add is autoHideMenuBar: true !

    This removes the menu, but also allows F11 to still be pressed for fullscreen. Maybe worth adding to the documentation for people to be able to create kiosk apps?

    const { app, BrowserWindow } = require(‘electron’);

    function createWindow() {
    // create the browser window
    const win = new BrowserWindow({
    width: 1280,
    height: 800,
    autoHideMenuBar: true,
    webPreferences: {
    nodeIntegration: true
    }
    });

    // and load the main file of the app
    win.loadFile(‘index.html’);
    //win.removeMenu();
    }

    app.whenReady().then(createWindow);

    #46396

    glad you worked it out, and thanks for the suggestion! :good:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.