Author Topic: WebView2Browser (Microsoft Edge Canary)  (Read 5352 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
WebView2Browser (Microsoft Edge Canary)
« on: May 27, 2020, 04:33:34 pm »
For those concerned:

Because the old Internet Explorer web browser is completely outdated,
I looked for an alternative and I came across this magnificent free C++ project written with Visual Studio 2019.

webview2

This project requires installing

1 - Microsoft Edge Canary (download)
2 - Microsoft FREE Visual Studio 2019 Community(download)
3 - WebView2Browser (download)

Useful links:
https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/0-9-488-reference-webview2
https://github.com/MicrosoftEdge/WebView2Samples/tree/master/WebView2APISample


And here is The "Canary Bay" WD17+ example that i have done for WinDev:


« Last Edit: June 01, 2020, 02:05:39 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
The Canary Bay project
« Reply #1 on: June 01, 2020, 02:06:30 pm »
About the Canary Bay project

I first wrote this project to retrieve music meta-data from the internet, and add cover art album to my audio file collection.
(They are stored in the "EXE\CoverArt" folder)

But soon it becomes obvious that i could turn it into a multi-purpose browser utility, with the help of the new Microsoft WebView2Browser based on chromium.

Fortunatly the WebView2Browser was a native application written in C++, rather than an IL .NET C# project that i dislike because of its huge framework overhead, and because it is IL code (Intermediate Language = same concept used by the WinDev p-code).

I made a custom version of the C++ source code, to let the brower work as a standalone or as an embedded slave application.

The slave application is what is being used in "Canary Bay".
I am using a region to embed/capture the browser on the fly, and make it work alike a WinDev internal window.
This part of the code is done in low level procedural coding style, using directly the native Windows SDK API.

The whole GUI is just plain WinDev code, i keep using WD17 rather than WD25 to limit the size of the framework.


« Last Edit: June 02, 2020, 05:33:41 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Jean-Michel INGELS

  • Newbie
  • *
  • Posts: 4
Projet Windev 25 avec browser intégré
« Reply #2 on: June 01, 2020, 05:53:59 pm »
Bonjour Patrice,

je suis à la recherche d'une solution efficace pour intégrer un browser dans un projet Windev basé sur leur exemple WD Bureautique.

Ceci afin de permettre à une utilisatrice de rester dans la même interface pour ces 2 fonctions.

Je vois que vous avez déjà bien creusé le sujet et que vous maîtrisez votre sujet.

Pensez-vous proposer un projet démo permettant de s'inspirer ?


Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: WebView2Browser (Microsoft Edge Canary)
« Reply #3 on: June 01, 2020, 10:49:56 pm »
Jean Michel

Je suis entrain de terminer le projet exemple "Canary Bay", mais comme vous devez vous en douter les choses ne sont jamais simple avec WinDev dès qu'on sort des sentiers battus.
Heureusement que je connais bien la programmation bas niveau, ce qui me permet de contourner les problèmes et d'arriver à mes fins...

Dans un premier temps je pense pouvoir poster le projet WD17, ici, demain dans la journée, car même si il fonctionne en version 25, je continue d'utiliser la version 17 car le framework est 3 fois moins gros, et les plantages y sont moins fréquents.

Note : j'utilise une version perso du code source C++ afin qu'il puisse fonctionner avec WinDev (64-bit uniquement)
« Last Edit: June 01, 2020, 10:53:56 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: WebView2Browser (Microsoft Edge Canary)
« Reply #4 on: June 02, 2020, 04:54:37 pm »
Here is the beta version.

Both binary and source code are attached to this post.
Patrice
(Always working with the latest Windows version available...)

Jean-Michel INGELS

  • Newbie
  • *
  • Posts: 4
Re: WebView2Browser (Microsoft Edge Canary)
« Reply #5 on: June 02, 2020, 05:57:01 pm »
Bonjour Patrice et merci pour la réactivité !

J'ai testé le projet et il est très fonctionnel. Un plaisir à lire. Simplicité extrême.

Du coup, première donation effectuée à l'instant, probablement d'autres en fonction de l'évolution de nos échanges.

Avant la fin de semaine, je vais intégrer votre travail dans un projet plus personnel.

J'en ai essayé d'autres et le vôtre est le plus abouti et le plus simple, rapide à mettre en oeuvre.

PC SOFT devrait vraiment s'en inspirer car ce doit être une demande régulière de leurs clients.

Mille mercis et à très bientôt.


Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: WebView2Browser (Microsoft Edge Canary)
« Reply #6 on: June 02, 2020, 07:11:13 pm »
Quote
PC SOFT devrait vraiment s'en inspirer car ce doit être une demande régulière de leurs clients.
J'ai essayé de communiquer sur ce projet sur le forum officiel, mais je me suis fait censurer par le modérateur.
Car j'ai eu le malheur de dire que leur champ HTM était obsolète...

J'envisage néanmoins de poster "Canary Bay" sur le site de dépôt si je ne suis pas bloqué.

Je ferai aussi certainement une version 100% en code natif, maintenant que la maquette WinDev fonctionne.
« Last Edit: June 02, 2020, 07:14:31 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)