InnoSetup Web Browsing - ISWebViewDll.dll : Embedding web content in InnoSetup
Code:
* Module : ISWebViewDll.dll
* Author : BLACKFIRE69
* Size : 771 KB
Note:
Quote:
1. Ensure your operating system is either Windows 10 or Windows 11 , as this module relies on Microsoft WebView2 Runtime.
|
Quote:
2. Users with other operating systems must independently download and install Microsoft WebView2 Runtime using the link provided:
Microsoft WebView2 Runtime
|
Example:
Code:
var
AWebView2Obj: FWebView2Obj;
procedure InitializeWizard();
begin
{ WizardForm Changes And New Buttons }
ModifyWizardForm;
{ ISWebView2 Object }
AWebView2Obj := InitWebView2ObjHandle;
AWebView2Obj.FCreate(WizardForm.Handle, ScaleX(20), ScaleY(60), WizardForm.ClientWidth - ScaleX(40), WizardForm.ClientHeight - ScaleY(100), HOMEPAGE_URL);
AWebView2Obj.OnNavigationStarting(@Frm1_OnNavigationStarting);
AWebView2Obj.OnUpdateNavigatingButton(@Frm1_OnUpdateNavigatingButton);
AWebView2Obj.OnNavigationDone(@Frm1_OnNavigationDone);
AWebView2Obj.OnTitleChanged(@Frm1_OnTitleChanged);
AWebView2Obj.OnPrintDone(@Frm1_OnPrintDone);
AWebView2Obj.OnSourceChanged(@Frm1_OnSourceChanged);
AWebView2Obj.OnStatusBarTextChanged(@Frm1_OnStatusBarTextChanged);
AWebView2Obj.OnProcessFailed(@Frm1_OnProcessFailed);
AWebView2Obj.OnScreenshotDone(@Frm1_OnSnapshotDone);
AWebView2Obj.OnClearBrowsingData(@Frm1_OnClearBrowsingData);
AWebView2Obj.OnClearCacheDone(@Frm1_OnClearCacheDone);
AWebView2Obj.OnPrintToPDFDone(@Frm1_OnPrintToPDFDone);
AWebView2Obj.Start;
end;
procedure DeinitializeSetup();
begin
AWebView2Obj := nil;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
if CurPageID = wpReady then
begin
// Perform the navigation after the ENTER key is pressed.
Result := False;
AWebView2Obj.Navigate(URLEdt.Text);
end;
end;
.