I’m new to this site, and basically I have created a Windows Form using C#.
On this form I have 3 values.
I have a button to access the values in my ListBox.
How could I make it so when the form loads, the first element in my list box is highlighted?
I was also wondering is there a way to start the indexing off for 1, if the first element in my list is selected? rather than 0?
I hope I have stated this as clearly as I should,
To select the first index, add this line to the
OnLoadevent of the form:As for your second question about changing the indexing range, the answer is no. You could use 1 to whatever, but then you would have to use -1 after. Like so: