How to create a web browser with Visual Studio 2019 Latest version

silvxrcat 1 Reputation point
2021-01-01T22:02:25.423+00:00

I want to create a simple web browser. How would I go doing this without the WebBrowser tool in the toolbox?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,366 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Karen Payne MVP 35,471 Reputation points
    2021-01-02T03:42:36.923+00:00

    Hello,

    You can double click on the project in solution explorer, for the PropertyGroup use this setup, save, build and the web browser control will be in the toolbox. If not C# remove the LangVersion and nullable elements.

    <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
    
        <PropertyGroup>
            <OutputType>WinExe</OutputType>
            <TargetFrameworks>net48;netcoreapp3.1</TargetFrameworks>
            <LangVersion>9.0</LangVersion>
            <Nullable>enable</Nullable>
            <UseWindowsForms>true</UseWindowsForms>
        </PropertyGroup>
    
    </Project>
    
    3 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.