Hello
I want to run the browser (Google Chrome with all the features and settings) inside the application(Form) .
In part code 1 calling the Google Chrome browser (with all features and settings), Provides our needs .
In Part code 2 of the Application(Form) , cefsharp provides the Internet connection but Does not meet our needs .
Items needed
1 - Run Chrome browser or another browser with all the features and settings of Google Chrome in the application(Form) .
2 - Access to the possibility of microphone .
What I have tried:
code 1 :
chrome("Url") ;
private static void Chrome(string link)
{
string url = "";
if (!string.IsNullOrEmpty(link))
{
if (link.Contains('.'))
{
url = link;
}
else
{
url = "https://www.google.com/search?q=" + link.Replace(" ", "+");
}
}
try
{
Process.Start("chrome.exe", url + " --incognito");
}
catch (System.ComponentModel.Win32Exception e)
{
MessageBox.Show("Unable to find Google Chrome...",
"chrome.exe not found!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Code 2 :
InitBrowser();
public ChromiumWebBrowser browser;
public void InitBrowser()
{
CefSettings settings = new CefSettings();
settings.CefCommandLineArgs.Add("enable-media-stream", "1");
settings.CefCommandLineArgs.Add("allow-running-insecure-content", "1");
settings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream", "1");
settings.CefCommandLineArgs.Add("enable-speech-input", "1");
settings.CefCommandLineArgs.Add("enable-usermedia-screen-capture", "1");
Cef.Initialize(settings);
browser = new ChromiumWebBrowser("https://www.google.com");
this.Controls.Add(browser);
browser.Dock = DockStyle.Fill;
}