Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Docking electron desktop app above browsers and other applications.

aarons92

New Coder
I have asked this question on a number of different forums and have not been able to find a solution. Can ANYONE tell me if this can be done?

When launched my Browserwindow is currently placed at the top of my screen which is what I want. However I also want the browser window to SIT ABOVE other applications. google chrome and other browsers such as Microsoft edge should sit below the electron app. (similar to how the windows taskbar works.)

I've looked at discussions online and apparently this is doable on macOs, however no ones really said for definite if this can be done on windows 10 or not.

Heres my code:

JavaScript:
const createWindow = () => {
    // Create the browser window.
    const mainWindow = new BrowserWindow({
        width: 1920,
        height: 200,
        alwaysOnTop:true,
        titleBarStyle: 'none',
        frame: false,
        resizable: false,
        minimizable: false,
        type: 'toolbar',
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false}
        });
 
    mainWindow.setAlwaysOnTop(true, "screen-saver");
    mainWindow.setVisibleOnAllWorkspaces(true);
    mainWindow.setMenuBarVisibility(false);
    mainWindow.moveTop();
    mainWindow.setPosition(0,0)
    // and load the index.html of the app.
    mainWindow.loadFile(path.join(__dirname, 'index.html'));


Does anyone have a solution for this?

Thankyou
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom