Robel T. Fesshaye

Infinite Innovation

  • Home

How to Set a Custom Taskbar Icon for Your Electron Window

December 29, 2016

To change the icon of your desktop app;

1- Design an icon and save it as .png (you can design an icon here).

2-Copy and save the icon in your folder.

3- Update the createWindow function with the following code :


function createWindow () {

 // Create the browser window.

 win = new BrowserWindow({width:1080, height: 840, minWidth:680,
 icon:__dirname + '/iconName.png'})
// and load the index.html of the app.

 win.loadURL(url.format({

 pathname: path.join(__dirname, 'index.html'),

 protocol: 'file:',

 slashes: true

 }))

  • Replace iconName with your icon’s file name.
Posted in: App Dev Tagged: Electron
← How to Auto Save HTML Form Data -Google Drive Style!
How I Passed the AWS Cloud Practitioner Exam in 10 Days →

Recent Posts

  • Just Released: Mastering AWS SysOps – Your Fast Track to Certification Success!
  • How I Passed the AWS SysOps – Associate (SOA-C02) Exam
  • How I Passed the Certified Kubernetes Application Developer (CKAD) Exam
  • How I Passed the Certified Kubernetes Administrator (CKA) Exam

Categories

  • App Dev (4)
  • AWS Solutions Architect – Associate (6)
  • Certifications (6)
  • Electrical Engineering (1)
  • Java (7)
  • PHP & SQL (2)
  • Windows OS (4)

Archives

Tags

#Apache #BlockPorn #DualScreen #Fonts #OpenDNS #Port80 Arrays autosave Electron SQLServer Strings Substrings

Copyright © 2025 Robel T. Fesshaye.

Me WordPress Theme by themehall.com