WebBrowser help
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts
Page 1 of 1
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
do you have to use this code or would you not mind switching as when i did a webbrowser had simillar problems so instead i made a listbox and just added items to it on document complete event and then saved it on form close and loaded it on form load
muttley1968 wrote:do you have to use this code or would you not mind switching as when i did a webbrowser had simillar problems so instead i made a listbox and just added items to it on document complete event and then saved it on form close and loaded it on form loadThing is that the site doesn't always have the same selected item
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023