R
rnes1961
I am using SetSelected to set a selected value on a listbox.
....
Console.Write("Ans 1: " & IntAns
lbAns1.SetSelected(IntAns, True)
Console.WriteLine(" Selected: " & lbAns1.SelectedIndex)
....
Where IntAns is an integer.
The thing is, it works just fine if I am in debug mode with a
breakpoint set anywhere. But if I take the breakpoint off, the index
does not get set.
Below is the results WITH a breakpoint set.
....
Ans 1: 3 Selected: 3
....
With NO breakpoint set
....
Ans 1: 3 Selected: 0
....
As you can see by the console.write commands the index gets set when a
breakpoint is set but not when the breakpoint is not set.
HELLPPP!!! I am at the end of my rope, with a target date looming.
....
Console.Write("Ans 1: " & IntAns
lbAns1.SetSelected(IntAns, True)
Console.WriteLine(" Selected: " & lbAns1.SelectedIndex)
....
Where IntAns is an integer.
The thing is, it works just fine if I am in debug mode with a
breakpoint set anywhere. But if I take the breakpoint off, the index
does not get set.
Below is the results WITH a breakpoint set.
....
Ans 1: 3 Selected: 3
....
With NO breakpoint set
....
Ans 1: 3 Selected: 0
....
As you can see by the console.write commands the index gets set when a
breakpoint is set but not when the breakpoint is not set.
HELLPPP!!! I am at the end of my rope, with a target date looming.