Electron tips and tricks on windows 10
2017-02-26 23:45:25
Electron is a developed framework on Node.js and provides wide access to native environment cross platforms.
I had some problems in developing app on windows 10 (in Tablet mode) with touchable screen.
1. Ignore two finger zoom
- create a shortcut of your app.exe
- right click on shortcut, click on properties, in General tab find target and add app.exe --kiosk -fullscreen --incognito --disable-pinch --overscroll-history-navigation=0
2. I needed to start application when system restart for any reason at startup. so you can add application to startup.
var scl = 1;
mainWindow = new BrowserWindow({ screen: electron.screen.getAllDisplays()[2], // depends on your display x:1920, width: 1080*scl, height: 1920*scl, fullscreen:true,minimizable:false,resizable :false,closable :false});
when system restarting in Tablet mode there is not applications allows to be in front. so after a while searching in Internet I find out that there is an application to allows you to run keyboard shortcut in command line. keystuff
setTimeout(function(){ var child = require('child_process').execFile; var executablePath = "/path/to//keystuff.exe"; var parameters = ["Alt-Tab"]; child(executablePath, parameters, function(err, data) { }); },1000);
3. If you pull data from api services you may need add:
app.commandLine.appendSwitch('ignore-certificate-errors');
Happy Coding!
Tags Cloud