07-26-2011, 10:51 PM
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:
Part of The ListBox part:
And Part of the WebBrowser part:
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.
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.