Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Displaying Data in WebBrowser
#3
Hi there,

Thank you very much for your help.
Unfortunately I am still having issues. I am just getting a blank browser. Here is some of the code to give you an idea. I won't post it all.

Here is the first part:
Code:
Public Class Form1

    Private Sub WebBrowser1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub KryptonListBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim Item As String = WebBrowser1.DocumentText.ToString()

        Dim index As Integer = KryptonListBox1.FindString(Item)

        If index = -1 Then

            KryptonListBox1.SelectedIndex = KryptonListBox1.SelectedIndex

        Else

            KryptonListBox1.SetSelected(index, True)

        End If
    End Sub

Part of The ListBox part:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        KryptonListBox1.Items.Add("Afters")

        KryptonListBox1.Items.Add("Ages")

        KryptonListBox1.Items.Add("Agro")

And Part of the WebBrowser part:
Code:
Private Sub KryptonButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click

        If KryptonListBox1.Text = "Afters" Then

            WebBrowser1.DocumentText = "Dessert - 'Are you having your afters?'"

        ElseIf KryptonListBox1.Text = "Ages" Then

            WebBrowser1.DocumentText = "A long time - 'It took ages!'"

        ElseIf KryptonListBox1.Text = "Agro" Then

            WebBrowser1.DocumentText = "Fight"

        ElseIf KryptonListBox1.Text = "Alco" Then

            WebBrowser1.DocumentText = "An alchoholic"

Now that code, along with the rest of it, if I change the WebBrowser back to TextBox or, in this case, KryptonTextBox1, it will work flawlessly. But I would really like to get it to diaply in the webbrowser because it looks more awesome.

I hope yourself or someone can help. Thank you so much in advance.


Messages In This Thread
Displaying Data in WebBrowser - by VicDesigns - 07-26-2011, 03:21 AM
Re: Displaying Data in WebBrowser - by vbcodegeek - 07-26-2011, 11:12 AM
Re: Displaying Data in WebBrowser - by VicDesigns - 07-26-2011, 10:51 PM
Re: Displaying Data in WebBrowser - by vbcodegeek - 07-27-2011, 07:05 AM
Re: Displaying Data in WebBrowser - by VicDesigns - 07-27-2011, 06:18 PM
Re: Displaying Data in WebBrowser - by VicDesigns - 07-28-2011, 06:02 AM
Re: Displaying Data in WebBrowser - by xolara - 07-29-2011, 05:29 AM
Re: Displaying Data in WebBrowser - by VicDesigns - 07-31-2011, 05:32 AM
Re: Displaying Data in WebBrowser - by vbcodegeek - 07-31-2011, 02:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I fill my form with MySQL data based on Combobox? kismetgerald 8 26,719 10-14-2012, 09:05 PM
Last Post: brandonio21
  Loading DB data into Combobox then populate TextBox Controls kismetgerald 0 5,712 09-02-2012, 08:44 PM
Last Post: kismetgerald
  Extracting Data From A Website Bradley 3 14,719 05-10-2012, 01:03 AM
Last Post: Bradley
  Bookmarking in Webbrowser Gamester699 0 5,917 11-03-2011, 12:28 PM
Last Post: Gamester699
  Update Data Tabel From Edit mfbf 1 8,551 07-30-2011, 12:54 PM
Last Post: brandonio21
  Custom Webbrowser Component vbcodegeek 2 11,524 07-12-2011, 03:56 AM
Last Post: vbcodegeek
  IceGecko WebBrowser Kaine599 3 15,057 02-17-2011, 02:34 PM
Last Post: redpois0n

Forum Jump:


Users browsing this thread: 1 Guest(s)