using System.Reflection.Metadata; using System.Web; using Microsoft.Web.WebView2.Core; using Microsoft.Web.WebView2.Core; using System.Windows.Forms; namespace EdgeVoyager { public partial class Form1 : Form { int zoom = 100; public Form1() { InitializeComponent(); InitializeAsync(); } private void CoreWebView2_NewWindowRequested(object sender, CoreWebView2NewWindowRequestedEventArgs e) { Form1 newForm = new Form1(); newForm.webView21.Source = new Uri(e.Uri); newForm.Show(); e.Handled = true; } async void InitializeAsync() { await webView21.EnsureCoreWebView2Async(null); webView21.CoreWebView2.WebResourceRequested += WebView2_WebResourceRequested; await webView21.CoreWebView2.ExecuteScriptAsync("window.onload=function(){window.chrome.webview.postMessage('100');};"); webView21.CoreWebView2.Profile.PreferredColorScheme = CoreWebView2PreferredColorScheme.Light; webView21.CoreWebView2.NewWindowRequested += CoreWebView2_NewWindowRequested; if (Settings1.Default.firstwindow == true) { //webView21.Source = new Uri(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "html", "index.html")); string htmlString = @"