WebBrowser help
Posted: Mon Nov 26, 2012 7:35 am
Hi guys I am having troubles with this I know the reason of the error but I have no Idea how to fix the code here is the problem and code
not sure how to fix this problem If you can help thanks please guys no spamming
Thanks Skyteam
Code: Select all
now the problem is if the Outputhistory equals nothing I get an error and form closes Dim outputhistory As HtmlElement = WebBrowser2.Document.GetElementById("OutputHistory")
Dim optionList As HtmlElementCollection = outputhistory.GetElementsByTagName("option")
Dim strIndex As String = outputhistory.GetAttribute("selectedIndex")
Dim index As Integer = Integer.Parse(strIndex)
Dim selectedText As String = optionList(index).InnerText
pxoutput.Text = selectedText
not sure how to fix this problem If you can help thanks please guys no spamming
Thanks Skyteam