1
I tried to create a Simple browser and when I finished I realized that it does not carry css the site gets horrible looks like a website outdated. :\
Can someone help me?
Photos from the site, if the code is useful of this small browser I will be happy to give you.
the following code is the browser code.
public Form1()
{
InitializeComponent();
webBrowser1.AllowWebBrowserDrop = false;
webBrowser1.ScriptErrorsSuppressed = true;
webBrowser1.WebBrowserShortcutsEnabled = false;
webBrowser1.IsWebBrowserContextMenuEnabled = false;
}
private void url_KeyPress(object sender, KeyPressEventArgs e)
{
bool link = true;
bool dom = true;
if (e.KeyChar == (char)13)
{
for(int i =0;i<url.Text.Length;i++)
{
if(url.Text[i] == ' ' )
{
link = false;
}
}
if(link == true)
{
for (int i = 0; i < url.Text.Length-1; i++)
{
if (url.Text[i] == '.')
{
dom = false;
}
}
if(dom == false)
{
}
else
{
url.Text = "https://www.google.com/search?client=firefox-b-d&q=" + url.Text.Replace(" ", "+");
}
}
else
{
url.Text = "https://www.google.com/search?client=firefox-b-d&q=" + url.Text.Replace(" ", "+");
}
webBrowser1.Navigate(url.Text);
}
}
private void F5_Click(object sender, EventArgs e)
{
webBrowser1.Refresh();
}
private void begin_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();
}
private void back_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
url.Text = Convert.ToString(webBrowser1.Url);
}
Hello Gonçalo, could you show a little code?
– Afonso
of course I will already update the question
– Gonçalo Garrido