When I drag the control in the designer of form1 from the toolbox the control is in the front:
The ChromiumWebBrowser control is on the top of everything when dragging it from the toolbox:
The problem is that I don't want the control to be on top of everything if I'm not running the application and clicking a button. I want the control to be in the form1 designer but not on the top.
so, I thought to create the control by code:
private void btnShowOnGoogleMaps_Click(object sender, EventArgs e)
{
ChromiumWebBrowser chromiumWebBrowser1 = new ChromiumWebBrowser();
chromiumWebBrowser1.Size = new Size(500,500);
chromiumWebBrowser1.Show();
chromiumWebBrowser1.Load("D:\\Csharp Projects\\Weather\\map.html");
}
but with the code when I click the button the control is in the back. no matter what I tried.
I tried to add this line:
chromiumWebBrowser1.BringToFront();
but it didn't change much. this is the control after clicking the button:
you can see the control (with the map) on the left side of the form1 on the left edge and the control is behind everything else.
I marked with red ellipse the control to show where it is hiding behind.