problem with tabcontrol and browsers in winforms c#

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

problem with tabcontrol and browsers in winforms c#

Postby vladozoff » Wed Apr 27, 2022 1:09 am

When added to a browser tabcontrol, black bars appear. How to remove them?
Image
Code below:
Code: Select all
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            CefSettings settings = new CefSettings();
            Cef.Initialize(settings);

            ChromiumWebBrowser webBrowser = new ChromiumWebBrowser("https://google.com/");

            tabPage1.Controls.Add(webBrowser);
            webBrowser.Dock = DockStyle.Fill;
        }
    }
}
vladozoff
Newbie
 
Posts: 3
Joined: Wed Apr 27, 2022 12:50 am

Re: problem with tabcontrol and browsers in winforms c#

Postby amaitland » Wed Apr 27, 2022 2:33 pm

Image is broken.

Most common cause of black bars can be fixed by making your application DPI aware.

https://github.com/cefsharp/CefSharp/wi ... s-high-dpi
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 14 guests