C# Form - transparent applications WebView2 unclickable

Viewed 257

When I create transparent applications with WebView2 c# form, It is not possible to click on visible elements.

When I click, it clicks on the window behind. I don't have the problem with WebBrowser

Do you have a solution ?

Thank you

            // 
            // webView21
            // 
            this.webView21.CreationProperties = null;
            this.webView21.DefaultBackgroundColor = System.Drawing.Color.Transparent;
            this.webView21.Location = new System.Drawing.Point(462, 12);
            this.webView21.Name = "webView21";
            this.webView21.Size = new System.Drawing.Size(337, 429);
            this.webView21.Source = new System.Uri("https://***", System.UriKind.Absolute);
            this.webView21.TabIndex = 2;
            this.webView21.ZoomFactor = 1D;

            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(800, 450);
            this.Controls.Add(this.webBrowser1);
            this.Controls.Add(this.webView21);
            this.Name = "Form1";
            this.Text = "Form1";
            this.TransparencyKey = System.Drawing.Color.Transparent;
            ((System.ComponentModel.ISupportInitialize)(this.webView21)).EndInit();
            this.ResumeLayout(false);

enter image description here

0 Answers
Related