View Single Post
  #3 (permalink)  
Old July 2nd, 2012, 11:24 AM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

After looking at the project you emailed me, I found it. You did everything correctly but the list control on the selection form doesn't have the input focus when the form is displayed and Microsoft in its infinite wisdom decided that this type of control should not show you what items are selected unless it has the focus.

If you display the form and press tab until the list has focus, you'll see that the correct item is selected.

To fix this, open the form in the designer. Be sure the form is selected and not one of its controls. Then open the View menu and select Tab Order. Now click on the control in the order in which you want them to get focus. Click the list first so it gets the initial focus. Now when you run the program, the form should work as expected.

Sorry about the confusion.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)