0

I'm developing a Winform tool using Viusal Studio 2022. I want to be able to browse the website through a form. But there is often a problem when opening a web page, that is, the web page is not fully displayed. For example, displaying a Google, cannot display a complete "login"

like this:

enter image description here

Here is my code:

    public partial class Form1 : Form

    {

        CefSharp.WinForms.ChromiumWebBrowser webCom = null;

        public Form1()

        {

            InitializeComponent();

            Load += Form_Load;

        }

        protected void Form_Load(object sender, EventArgs e)

        {

            webCom = new CefSharp.WinForms.ChromiumWebBrowser("www.Google.com");

            webCom.Dock = DockStyle.Fill;

            panel1.Controls.Add(webCom);

            webCom.Load("www.Google.com");

        }

        private void btn_multiChrome_Click(object sender, EventArgs e)

        {
            for (int i = 0; i < 5; i++)
            {

                childForm child = new childForm();

                child.Show();

            }

        }

    }

It has been set to maximize, even if the size is modified, it still cannot be displayed in full. Does anyone know where the problem is?

Bulat
  • 3
  • 3
  • 1
    https://stackoverflow.com/questions/13228185/how-to-configure-an-app-to-run-correctly-on-a-machine-with-a-high-dpi-setting-e – Hans Passant Apr 16 '23 at 15:08

1 Answers1

0

Usually in this case you can try the following steps:

  1. As Hans Passant suggested, you can tick the "XP style DPI scaling" checkbox to 125%. Or try another zoom level.
  2. Check your project configuration. Make sure it is x86 or x64
  3. Try to reinstall or use another version of the browser kernel plug-in

Since you set the Dock to full, I don't think there is a problem with your code. Usually it should be considered a problem of the operating environment.

sssr
  • 364
  • 1
  • 6