Home

Awesome

WebUI4Delphi Tweet

WebUI4Delphi is a WebUI wrapper, which allows you to use any web browser as a GUI, with Delphi or Lazarus/FPC in the backend and HTML5 in the frontend.

WebUI allows you to link your Delphi or Lazarus application with a web app that runs in a web browser installed in the operating system. Originally WebUI was created to have all the UI code in the web browser and the rest of the code in your hidden Delphi or Lazarus application. However, you can also decide to have a visible Delphi or Lazarus application communicating with a HTML5 app. You can get web browser events in your desktop application, call Pascal functions from JS, call JS functions from Pascal code, execute JavaScript, etc.

WebUI4Delphi can be used in Delphi or Lazarus applications for Windows, Linux and MacOS.

WebUI4Delphi was developed and tested on Delphi 12.2 and Lazarus 3.6/FPC 3.2.2 but it also supports Delphi 2010.

WebUI4Delphi includes VCL, FireMonkey (FMX), LCL and console examples.

WebUI4Delphi demos have been tested in Windows 10, Windows 11, Linux Mint 21.2 and Raspberry Pi OS.

WebUI doesn't embed a web browser in your application. It's used as a bridge between a desktop application and the web browser running an HTML5 app. If you need to embed a web browser instead of using the installed web browser then consider using CEF4Delphi or WebView4Delphi.

Features

Minimal Example

program Minimal;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils, uWebUI, uWebUIWindow, uWebUITypes;

var
  LWindow : IWebUIWindow;

begin
  try
    WebUI := TWebUI.Create;
    if WebUI.Initialize then
      begin
        LWindow := TWebUIWindow.Create;
        LWindow.Show('<html><head><script src="webui.js"></script></head> Hello World ! </html>');
        WebUI.Wait;
      end;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

More examples

Text editor

This text_editor is a lightweight and portable example written in Delphi and JavaScript using WebUI as the GUI.

text_editor

Installation

Links

Support

If you find this project useful, please consider making a donation.

paypal

You can also support this project with Patreon.

<a href="https://patreon.com/salvadordf"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /></a>

You can also support this project with Liberapay.

<a href="https://liberapay.com/salvadordf/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>

Related projects

Other resources

Additional: Delphinus-Support