"Cross-thread operation error" occurs when you try to update objects on the UI thread from another thread. To resolve, you need to invoke on the UI thread:
public delegate void UpdateControlsDelegate();
public void GrabInfo()
{
InvokeUpdateControls();
}
public void InvokeUpdateControls()
{
if (this.InvokeRequired)
{
this.Invoke(new UpdateControlsDelegate(UpdateControls));
}
else
{
UpdateControls();
}
}
private void UpdateControls()
{
regionTB.Text = geoRegion(bo2IpListBox.FocusedItem.SubItems[1].Text);
cityTB.Text = geoCity(bo2IpListBox.FocusedItem.SubItems[1].Text);
zipTB.Text = geoZIP(bo2IpListBox.FocusedItem.SubItems[1].Text);
ispTB.Text = geoISP(bo2IpListBox.FocusedItem.SubItems[1].Text);
}