I am trying to use a combobox as an input for resolving an IP address, but I have an issue. When a user selected their desired IP from the list, and click 'test', it doesn't seem to recognise the input of the combobox. If I replace the combobox with a text box, it works fine - for some reason, it won't accept the combobox input, even thought the result of both that and the textbox are exactly the same, they are both simple strings.
Dim ip As String = combobox1.Text
_sock = New TcpClient(ip, port)
If I change 'combobox1.Text' to textbox1.Text, and then enter the IP manually into textbox1, it doesn't work! I also tried 'combobox1.Text.ToString', and that didn't work. This is extremely frustrating, so a quick answer would be appreciated, thanks.
SelectedItem
orSelectedText
properties? – Rowland ShawSelectedText
property returns 'No connection could be made because the target machine actively refused it' – Rowland Shaw