We Are GAP Mobilize
Free Assessment Tool

Move to Web to the Desktop or just Both

by Mauricio Rojas, on Nov 10, 2019 5:25:46 PM

My youngest son has a sweet tooth. And every time I asked him to choose a dessert he used to cry. When I asked why he said: because you are making me choose!!!

So, usually, when we modernize legacy applications like VB6, WinForms, Powerbuilder or Delphi... we used to ask: do you want to go to Web or Desktop. But what about both?

So today we'll do that and we will be using Electron.


Electron is an open-source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining Chromium and Node.js into a single runtime and apps can be packaged for Mac, Windows, and Linux.

Electron began in 2013 as the framework on which Atom, GitHub's hackable text editor, is built. The two were open-sourced in the Spring of 2014.

It has since become a popular tool used by open source developers, startups, and established companies.

Turning a VB6 Legacy App into a Web and Desktop App

Using the SKS demo we will show how easy it is to do this conversion.

Just follow these steps:

  • Create a directory called Electron
  • Switch to that directory
  • Clone SKS WebMap running

git clone https://github.com/MobilizeNet/SKSWebMap.git

git clone https://github.com/MobilizeNet/SKSElectron.git

  • Build binaries for Win64 and OSX. Switch to SKSWebMap and run:

dotnet publish -c Release -r osx-x64

dotnet publish -c Release -r win-x64

  • After compilation you will have two folders under SKSWebMap\bin\Release\netcoreapp2.2 called osx-x64 and win-x64 copy these two folders to SKSElectron\api

  • Go to SKSElectron and run npm install

  • After installation you can run electron . to test your app inside electron or run electron-builder to build your binaries for windows and mac

NOTE: On some computers the you need to run the electron-builder by running node_modules\.bin\electron-builder

And that's all. After that you will have a folder Electron\dist with an exe that is your installer for a Windows Desktop App. You can run the same on a Mac to build binaries for OSX



Topics:.NET Coredesktopvb.net


Subscribe to Mobilize.Net Blog