Frameless Application in Electron

electron.png

What Will I Learn?

  • You will learn Frame properties in electron
  • You will learn How to make Frameless Application

Requirements

Difficulty

  • Intermediate

Description

In this video I will show you how to make an electron custom frame
I will close the electron frame feature and design our own frame
A frameless window is a window that has no chrome, the part of the window
The frame feature is avalible in the Beowser Window modüle
It defined in Browser Window and true by default
There are menü areas with Shutdown, maximize and minimize buttons
There are menü area contains the necessary functions
İf we want to close ethese fields all we have to do is maket he frame false

111111.jpg

Let’s start creating a custom frame
First we create buttons
Let’s define div with id equal content

2222222.jpg

Create a header element and place buttons in this element
333333.jpg

I’ll edit by giving style
Create a file with a css extension for it I will give the style in this file
Write the style.css file as the href attribute of the link element in index.html
44444444.jpg

We can now give style
I’ll first get the page to its default settings
555555.jpg

Let’s design the header element

66666.jpg

Now let’s design option class

7777.jpg

Okey now the design has formed
Now change the colro when Mouse comes on the buttons
I’ll give each button a different color to give the button id
İd=”close” id=”max” id=”min”

88888.jpg

Now the close button hover was red and the other buttons hover were gray
We finished our design
Now let’s add functionality to these buttons
Write onclick attribute to buttons

9999.jpg
Electron will use the remote modüle to reach the window

10.jpg

We can Access the window with get current window function
12.jpg
Write close and min functions
13.jpg
We must write a condition fort he maximize operation
Make full screen if not full screen if it is full screen restore it
14.jpg

Project Github Link

Video Tutorial

Curriculum



Posted on Utopian.io - Rewarding Open Source Contributors

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center