home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / focus002 / readme.now < prev   
Text File  |  1992-05-15  |  2KB  |  42 lines

  1. This is the revised version of the Focus U-Turn test program. 
  2. .
  3. It demonstrates the same type of data validation techniques as the first
  4. version, but extends it to include forms that have option buttons and 
  5. check boxes. 
  6. .
  7. Option buttons must be handled differently because they operate as a group
  8. of mutually-exclusive controls rather than as independent controls. In VB,
  9. only one option button in a group can be TRUE. This is not the case when
  10. programming in SDK/C/C++. If you are used to SDK/C/C++ option button
  11. (a.k.a. radio button) behavior, some of the VB behavior will be different.
  12. .
  13. The general idea for doing data validation for option buttons is to validate
  14. them BEFORE they are used. If the option button can be a valid choice, then
  15. enable it; otherwise disable it. 
  16. .
  17. The same technique is used for check boxes, although slightly modified
  18. because check boxes DO operate as independent controls. However, they
  19. should only be made available for use if they are valid choices. 
  20. .
  21. In some cases, it may be necessary to add more conditions to option button
  22. and check box groups. It is more likely that this will be the case with
  23. check box groups than with option button groups. Option button groups must
  24. be mutually-exclusive choices, but check box groups can be structured so 
  25. that selecting one check box automatically selects other check boxes (or
  26. deselects them). Doing this type of automatic control selecting/deselecting
  27. makes doing Focus U-Turns more complex.
  28. .
  29. After performing some extensive testing, I have concluded that it is nearly
  30. impossible to do Focus U-Turns with a drop down combo box. Some of the 
  31. important Windows API-level messages are either ignored or given reduced
  32. significance by VB at the event level. Doing Focus U-Turns requires certain
  33. Windows API-level messages to be given VB event status. Focus U-Turns also
  34. require a certain priority and sequence to these events. For combo boxes
  35. (except drop down list box style), this does not appear to occur. 
  36. .
  37. I do not recommend using combo boxes on forms that require 'verfiy when exit
  38. control' type of edits. Instead, use a text box and a list box (which is 
  39. what a combo box really is). 
  40. .
  41.  
  42.