I am confused on how to write a calcDistance event handler. I am trying to let the user pick a city and state from a listbox and then take that city and calcDistance using lon and lat that I have in arrays, then taking the 5 smallest ones and putting them in 5 labels and their distances in 5 labels next to them. What I am not sure about is how to get selectedItem and then where do I put the code at? Do I put it in the form_load or do I put it in the CalcDistance function where I have all the code for that? Any help would be greatly appreciated.
↧