Hi There,
I am trying to make a program were you ask it a question and it gives you the answer in a webbrowser on the same form page, here is the coding:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "What's the weather today" Then RichTextBox1.Text = "Finding weather for **********, ***** today"
WebBrowser1.Navigate("http://www.bbc.co.uk/weather/2653877")
Reset()
If TextBox1.Text = "Hello" Then RichTextBox1.Text = "Hello"
If TextBox1.Text = "Did Manchester United win" Then
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Did Manchester City win" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Did Chelsea win" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Did Everton win" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Who won football" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "What is pythagorean theorem" Then RichTextBox1.Text = "A theorem stating that the square of the length of the hypotenuse of a right triangle is equal to the sum of the squares of the lengths of the other sides. It is mathematically stated as c 2 = a 2 + b 2 , where c is the length of the hypotenuse and a and b the lengths of the other two sides."
End If
End Sub
But every time I enter a command into the "textbox1", it just shows me the sports page and nothing else
Can someone please help :)
Thanks
I am trying to make a program were you ask it a question and it gives you the answer in a webbrowser on the same form page, here is the coding:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "What's the weather today" Then RichTextBox1.Text = "Finding weather for **********, ***** today"
WebBrowser1.Navigate("http://www.bbc.co.uk/weather/2653877")
Reset()
If TextBox1.Text = "Hello" Then RichTextBox1.Text = "Hello"
If TextBox1.Text = "Did Manchester United win" Then
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Did Manchester City win" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Did Chelsea win" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Did Everton win" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "Who won football" Then RichTextBox1.Text = "I'm on it"
WebBrowser1.Navigate("http://www.bbc.co.uk/sport/football/live-scores")
Reset()
If TextBox1.Text = "What is pythagorean theorem" Then RichTextBox1.Text = "A theorem stating that the square of the length of the hypotenuse of a right triangle is equal to the sum of the squares of the lengths of the other sides. It is mathematically stated as c 2 = a 2 + b 2 , where c is the length of the hypotenuse and a and b the lengths of the other two sides."
End If
End Sub
But every time I enter a command into the "textbox1", it just shows me the sports page and nothing else
Can someone please help :)
Thanks