home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / focus002 / foc001f.frm (.txt) next >
Visual Basic Form  |  1992-05-15  |  13KB  |  274 lines

  1. Foc001
  2. #Focus U-Turn Test Program (Revised)
  3. wwwwp
  4. wwwwwp
  5. Form1+
  6. lblNumericOnly
  7.  Numeric-Only
  8. lblAlphaOnly
  9. Alphabetic-Only
  10. lblLeftRight
  11. Left / Right
  12. lblValue
  13.  Value
  14. txtNumericOnly
  15. txtAlphaOnly
  16. hsbLeftRight    
  17. lblLRValue
  18. lblOptions
  19.      Options:
  20. lblCategories
  21.  Categories:
  22. lblType
  23. Type:
  24. rbtOptions
  25. rbtOptions
  26.     cbxChkBox
  27.     cbxChkBox
  28. clbType
  29. rbtOptions
  30. rbtOptions
  31.     cbxChkBox
  32.     cbxChkBox
  33. lblComments1
  34. When ALL control edits are passed, this form can be unloaded or exited.  ALL controls, except option buttons and push buttons, are initialized to values that will fail verification.  This is done to require input of valid values. 
  35. pbtLoadFocusUTurn
  36. "   Unload  FOCUS-U-TURN Form . . .
  37. lblComments2
  38. The 'Unload...' push button transfers to a second form that allows this form to be reloaded.  The 'Verify and Exit' push button will NOT allow an exit unless ALL edits are passed.  
  39. pbtExit
  40.  Verify and Exit
  41. pbtExitNoVerify
  42.  Exit Without Verify
  43. Text1_Change
  44. Form_Click
  45.     Form_Load
  46.     nVerifyOK
  47. txtFirstName_Change#
  48. txtFirstName_GotFocus
  49. hgCtlWithFocus
  50. GetFocus
  51. ngVerifyOKE
  52. txtLastName_Change
  53. hsbLeftRight_Change
  54. txtFirstName_LostFocus\
  55. txtFirstNameE
  56. Textg
  57. nRetValh
  58. PostMessage
  59. WM_NEXTDLGCTL
  60. lParam
  61. txtLastName_GotFocus+
  62. hsbLeftRight_GotFocus
  63. SendMessage
  64. FALSE
  65. ngCtlFocusIDk
  66. txtLastName
  67. hsbLeftRightq
  68. txtLastName_LostFocusN
  69. hsbLeftRight_LostFocusk
  70. Value
  71. nCurrValue
  72. ngCurrValue2
  73. nTypeK
  74. Verifyn
  75. pbtExit_ClickW
  76. SelStart
  77.     SelLength
  78. clbType_Change
  79. clbType_GotFocus\
  80. clbType
  81. clbType_LostFocus
  82. csbType0
  83.     ListIndex
  84. ngCurrIndex
  85. nVerifyAll
  86. lblType_Click
  87. FocusUTurn/
  88. Foc001
  89. pbtLoadFocusUTurn_Clickz
  90. Foc002u
  91. lblLeftRightValue?
  92. Caption
  93. Command1_Click%
  94. pbtExitNoVerify_Click
  95.     nMsgOnOff@
  96. nMsgOn
  97. pbtExit_GotFocus
  98. pbtLoadFocusUTurn_GotFocus
  99. Label1_Clicks
  100. ngCurrDirectionValue&
  101. ngIgnoreClick
  102. ngNumberOfCtls
  103. rbtDirection_Click
  104. Index
  105. szMsg
  106. rbtDirection
  107. rbtDirection_GotFocus@
  108. rbtDirection_LostFocus
  109. AllDone\
  110. ByeBye
  111. AstaLaVistaBayBee
  112. rbtDirection1_Clicku
  113. rbtDirection_GotFocus2Z
  114. rbtDirection1_GotFocus
  115. rbtDirection1_LostFocus9
  116. rbtDirection2
  117. ElsenMsgOn
  118. rbtDirection2_Click
  119. rbtDirection2_GotFocus
  120. rbtDirection2_LostFocusr
  121. rbtDirection1
  122. rbtDirection1_DblClick
  123. rbtDirection1_DragDrop4
  124. SourceR
  125. rbtDirection1_DragOver
  126. State
  127. rbtDirection1_KeyDown
  128. KeyCode%
  129. Shift6
  130. rbtDirection1_KeyPress
  131. KeyAscii
  132. rbtDirection1_KeyUp
  133. szStr
  134. rbtDirection2_DblClickP
  135. rbtDirection2_DragDrop
  136. rbtDirection2_DragOverW
  137. rbtDirection2_KeyDown
  138. rbtDirection2_KeyPress
  139. rbtDirection2_KeyUp}
  140. RemszMsg
  141. ngSaveRadioButtonValue
  142. rbtOptions
  143. rbtOptions_GotFocus
  144. rbtOptions_LostFocus
  145. ngSaveHScrollValue
  146. ngSaveListIndex=
  147. ngSaveOptValues
  148. ngSaveLRValue
  149. lblLRValue
  150. Enabled
  151.     ngSaveOpt
  152. ngSaveOpts
  153. clbType_Click
  154. cbxC1_Click
  155. cbxC1_GotFocus
  156. cbxC1
  157. ngSaveC1Value
  158. cbxC1_LostFocus
  159. cbxC1_DragDrop
  160. cbxC1_KeyUp
  161. ValuengSaveOptValuesi    
  162.     UNCHECKED
  163. ngSaveC1ValuesG
  164. ngSaveChkBoxValues.    
  165. cbxChkBox_GotFocus
  166. cbxChkBox_LostFocuse
  167.     cbxChkBox
  168. InitOptsAndChkBoxes
  169. txtNumericOnly_GotFocus
  170. txtNumericOnly_LostFocus
  171. txtAlphaOnly_Change
  172. txtAlphaOnly_GotFocus
  173. txtAlphaOnly_LostFocus
  174. txtNumericOnly
  175. txtAlphaOnly'
  176. txtNumericOnly_KeyPress
  177. txtAlphaOnly_KeyPress
  178. ValidateForm
  179. VerifyForm
  180.     nSwitchId
  181. clbType_KeyDown5
  182. SkipIt
  183. WhyNotSkipIt
  184. nCtlID
  185. ngCtlID
  186. nDoNotSetFocus
  187.     nSetFocus
  188. ngOptsAndChkBoxesJustReset
  189. cbxChkBox_Click&
  190. ngNumberOfCtlsStep
  191. MSG_WARNING
  192. szTitle
  193. StupidFunctiond
  194. ChkBoxGotFocus
  195. ChkBoxLostFocus2
  196. Form_Load
  197.  ngSaveListIndex = 99t
  198. (A1 xor A2) and (C1 or C2)
  199. (B1 xor B2) and (D1 or D2)
  200. (A1 xor B1) and (C1 or D1)
  201. (A2 xor B2) and (C2 or D2)
  202. hsbLeftRight_GotFocus
  203.  This is where we 'think' we are...so all is well...
  204. hsbLeftRight_LostFocus
  205.  Do NOTHING...let GotFocus handle 'Focus U-Turns'...
  206. hsbLeftRight_Change
  207.  Verify OK...so ignore this...
  208.  hsbLeftRight is current control...so do nothing...t
  209. pbtExit_Click
  210.  szMsg$ = "pbtExit_Click: ngCtlFocusID = " + LTrim$(RTrim$(Str$(ngCtlFocusID)))C
  211.  MsgBox szMsg$
  212.  Do NOTHING...not interested since no problem...
  213. clbType_GotFocus
  214. szMsg$ = "GotFocus: ListIndex = " + LTrim$(RTrim$(Str$(clbType.ListIndex)))
  215. szMsg$ = szMsg$ + LTrim$(RTrim$(Str$(ngSaveListIndex)))c
  216. MsgBox szMsg$$
  217.  This is where we 'think' we are...so all is well...
  218. clbType_LostFocus
  219. szMsg$ = "clbType_LostFocus: ngCtlFocusID = " + LTrim$(RTrim$(Str$(ngCtlFocusID)))
  220. MsgBox szMsg$T
  221.  Do NOTHING...Let GotFocus handle 'Focus U-Turns'...
  222. pbtLoadFocusUTurn_Click
  223.  szMsg$ = "pbtLoadFocusUTurn_Click: ngCtlFocusID = " + LTrim$(RTrim$(Str$(ngCtlFocusID)))
  224.  MsgBox szMsg$
  225.  Do NOTHING...not interested since no problem...
  226. pbtExitNoVerify_Click
  227. pbtExit_GotFocus
  228.  All of the events are coded to stop on the FIRST edit error...If it isi
  229.  important to see ALL edit errors then another function similar to
  230.  FocusUTurn() can be used...However, it is more complicated because it
  231.  requires that you KNOW how many errors so that you can actually do theo
  232.  'Focus U-Turn' on the last one in addition to displaying the message...
  233.  Alternatively, you could build a list of all errors, load-up a listboxs
  234.  with the error list and then do the 'Focus U-Turn' via a 'OK' push 
  235.  button on a modal form...
  236.  Current control is OK...so continue checking the other controls...z
  237.  Do NOTHING...not interested since no problem...
  238.  Already did this one...
  239.  No need to do anything more at this point....
  240. pbtLoadFocusUTurn_GotFocus
  241.  szMsg$ = "pbtLoadFocusUTurn_GotFocus: ngCtlFocusID = " + LTrim$(RTrim$(Str$(ngCtlFocusID)))
  242.  MsgBox szMsg$
  243.  Current control is OK...so continue checking the other controls...z
  244.  Do NOTHING...not interested since no problem...
  245.  Already did this one...
  246.  No need to do anything at this point...
  247. rbtOptions_GotFocus
  248.  szMsg$ = "GotFocus: Index = " + LTrim$(RTrim$(Str$(Index)))
  249.  MsgBox szMsg$
  250. rbtOptions_LostFocus
  251.  szMsg$ = "LostFocus: Index = " + LTrim$(RTrim$(Str$(Index)))
  252.  szMsg$ = szMsg$ + " ngCtlFocusID = " + LTrim$(RTrim$(Str$(ngCtlFocusID)))
  253.  MsgBox szMsg$
  254.  Do NOTHING...let GotFocus handle 'Focus U-Turns'...
  255. clbType_Click
  256. szMsg$ = "Click: ListIndex = " + LTrim$(RTrim$(Str$(clbType.ListIndex)))
  257. MsgBox szMsg$$
  258. cbxChkBox_GotFocus
  259. cbxChkBox_LostFocus
  260. txtNumericOnly_GotFocus
  261.  This is where we 'think' we are...so all is well...
  262. txtNumericOnly_LostFocus
  263.  Do NOTHING...let GotFocus handle 'Focus U-Turns'...
  264. txtAlphaOnly_GotFocus
  265.  szMsg$ = "txtAlphaOnly_GotFocus: ngCtlFocusID = " + LTrim$(RTrim$(Str$(ngCtlFocusID)))
  266.  MsgBox szMsg$
  267.  This is where we 'think' we are...so all is well...
  268. txtAlphaOnly_LostFocus
  269.  Do NOTHING...let GotFocus handle 'Focus U-Turns'...
  270. txtNumericOnly_KeyPress
  271. txtAlphaOnly_KeyPress
  272.  szMsg$ = "txtAlphaOnly_KeyPress: KeyAscii = " + LTrim$(RTrim$(Str$(KeyAscii)))C
  273.  MsgBox szMsg$
  274.