KioskBrowser demo in CEF4Delphi and WebView4Delphi with a virtual keyboard lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- salvadordf 路 2025-08-10 15:40 Hi, I just added a new KioskBrowser demo for Lazarus in the CEF4Delphi and WebView4Delphi projects. This demo implements the virtual touch keyboard in Windows using the ITipInvocation, IInputHostManagerBroker and IImmersiveShellBroker interfaces. https://github.com/salvadordf/CEF4Delphi/blob/master/demos/Lazarus_Win dows/KioskBrowser/uVirtualTouchKeyboard.pas Those interfaces are not documented but they are available in Windows 8, 10 and 11 they work best in a fully updated Windows 10 or 11 system. The attached picture shows the KioskBrowser demo for Lazarus in the WebView4Delphi project. ---------------------------------------------------------------------- loaded 路 2025-08-10 16:00 Thank you very much for your work salvadordf 馃憦 ---------------------------------------------------------------------- egsuh 路 2025-09-03 05:51 Thank you for your efforts, salvadordf. When I install Webview4Delphi, where are the example projects stored? ---------------------------------------------------------------------- egsuh 路 2025-09-03 05:54 I found it. They are under.. 聽 聽 C:\Users\USER\AppData\Local\lazarus\onlinepackagemanager\packages\ WebView4Delphi\demos\Lazarus ---------------------------------------------------------------------- egsuh 路 2025-09-04 04:22 Thank you salvadordf for your programs. But when I installed WebView4Delphi, I couldn't see components in the object inspector. This happened in two separate PCs. Could you check this? Regards, ---------------------------------------------------------------------- egsuh 路 2025-09-04 07:05 I'm trying to make this work, following the example of your SimpleBrowser. But I cannot make my first demo run. Simply nothing appears on the form. Code: Pascal 聽[Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program project1;聽{$mode objfpc}{$H+}聽uses聽 聽{$IFDEF UNIX}聽 聽cthreads,聽 聽{$ENDIF}聽 聽{$IFDEF HASAMIGA}聽 聽athreads,聽 聽{$ENDIF}聽 聽Interfaces, // this includes the LCL widgetset聽 聽Forms, Unit1聽 聽{ you can add units after this };聽{$R *.res}聽begin聽 聽RequireDerivedFormResource:=True;聽 聽Application.Scaled:=True;聽 聽{$PUSH}{$WARN 5044 OFF}聽 聽Application.MainFormOnTaskbar:=True;聽 聽{$POP}聽 聽Application.Initialize;聽 聽Application.CreateForm(TForm1, Form1);聽 聽Application.Run;end.聽聽unit Unit1;聽{$mode objfpc}{$H+}聽interface聽uses聽 聽Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,聽 聽uWVBrowser, uWVWindowParent, uWVLoader,聽 聽uWVBrowserBase;聽type聽聽 聽{ TForm1 }聽聽 聽TForm1 = class(TForm)聽 聽 聽 Button1: TButton;聽 聽 聽 WVBrowser1: TWVBrowser;聽 聽 聽 WVWindowParent1: TWVWindowParent;聽 聽 聽 procedure Button1Click(Sender: TObject);聽 聽 聽 procedure FormShow(Sender: TObject);聽 聽private聽聽 聽public聽聽 聽end;聽var聽 聽Form1: TForm1;聽implementation聽{$R *.lfm}聽{ TForm1 }聽procedure TForm1.Button1Click(Sender: TObject);begin聽 聽WVBrowser1.Navigate(UTF8D ecode('http://www.alphaq.biz'));end;聽procedure TForm1.FormShow(Sender: TObject);begin聽 if GlobalWebView2Loader.InitializationError then聽 聽 showmessage(UTF8Encode(GlobalWebView2Loader.ErrorMessage))聽 聽else聽 聽 if GlobalWebView2Loader.Initialized then聽 聽 聽 WVBrowser1.CreateBrowser(WVWindowParent1.Handle)聽 聽 聽else聽 聽 聽 // Timer1.Enabled := True;end;聽initialization聽 GlobalWebView2Loader 聽 聽 聽 聽 聽 聽 聽:= TWVLoader.Create(nil);聽 GlobalWebView2Loader.UserDataFolder := UTF8Decode(ExtractFileDir(Application.ExeName) + '\CustomCache');聽 GlobalWebView2Loader.StartWebView2;聽end. What I have changed in the object inspector are: - WVBrowser1.DefaultURL = https://www.bing.com - WVWindowParent1.Browser = WVBrowser1 The SimpleBrowser project works well. ---------------------------------------------------------------------- egsuh 路 2025-09-04 08:48 I'm sorry. My previous example works. Simply too slow (My PC has 4 GB memory). But stil it needs some kind of refresh, as I can see the content when I resize the form. ---------------------------------------------------------------------- salvadordf 路 2025-09-04 08:55 Quote from: egsuh on September 04, 2025, 06:22:49 amThank you salvadordf for your programs. But when I installed WebView4Delphi, I couldn't see components in the object inspector. This happened in two separate PCs. Could you check this? Regards, It works as expected. See the attachment. ---------------------------------------------------------------------- egsuh 路 2025-09-04 10:11 Once I reinstall Lazarus, and then some packages including Webview4Delphi through OnlinePackageManager, the program goes away. Currently my computers work fine. ---------------------------------------------------------------------- salvadordf 路 2025-09-04 10:24 Reinstalling Lazarus also restores the Lazarus executable. If you had components that require rebuilding the IDE then they will probably stop working until you install them again and rebuild Lazarus. ---------------------------------------------------------------------- egsuh 路 2025-09-04 10:52 Hi salvadordf, Thank you again for your programs. To summarize: - My Lazaruses were working fine. - When I first installed WebView4Delphi, I couldn't see the components in the Object inspector. - I reinstalled Lazarus and the packages I used to use (via online package manager), then I can see components in the object inspector. - And I can use Webview4Delphi. But the content of webpage is not displayed automatically until I resize the form. - Now I have added the following event handler, and the form automatically display the content of webpage. Code: Pascal 聽[Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.WVBrowser1AfterCreated(Sender: TObject);begin聽 聽WVWindowParent1.UpdateSize;end;聽 - So I wonder TWVWindowParent does not display the content of the webpage until its size is updated. This is my experience, and now I can use your component for my application --- to preview HTML聽 (and maybe + javascript) produced by my application. The old HTMLViewer were too limited, as it cannot process many features of recent HTML5. So I really appreciate your efforts and products. The small issues I wrote here are just for your information. I can not bypass them. And I hope that they can contribute to enhancing your products further.