I am developping a software for my company. I am coding everything in VB.NET in Visual Studio Professionnal 2019. At some point, I make a Control window in which I include a Panel object. I then add a browser in this Panel object in order to display a web content in the panel of my interface.
Here is the code managing this part in the Show() method of my Control object :
Me.PanelWebBrowser.Controls.Add(browser)
browser.Size = PanelWebBrowser.Size
browser.LoadUrl("https://my-http.com")
browser.Show()
My panel is defined as follows :
Me.PanelWebBrowser.Controls.Add(Me.label_3D_visualization)
Me.PanelWebBrowser.Location = New System.Drawing.Point(1001, 222)
Me.PanelWebBrowser.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.PanelWebBrowser.Name = "PanelWebBrowser"
Me.PanelWebBrowser.Size = New System.Drawing.Size(724, 600)
Me.PanelWebBrowser.TabIndex = 18
I noticed that depending on the screen parameters, the content is not always displayed well in the panel.
For a screen of small size, the Windows parameters for text size are 150% and in that case the browser is not well displayed :
For a wider screen however, the text size in the windows parameters is 100% and in that case the browser is perfectly displayed:
What I would like is to have the 2nd picture's display all the time ! What can I do to make the content adapt to the screen size and display well ? I am new to VB.NET so please help me accordingly :)