home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / alexrk / alex.frm (.txt) < prev    next >
Visual Basic Form  |  1980-01-04  |  23KB  |  427 lines

  1. Form1
  2. Alex's Rocket Programmer 
  3. Form1%
  4. SlopeBox
  5. Frame1
  6. Colors
  7. White
  8. White
  9. Black
  10. Black
  11. Green
  12. Green
  13. Option5
  14. Option4
  15. Option3
  16. Option2
  17. ProgramBox
  18. Picture1
  19. Option1
  20. TestBox
  21. Run_Program
  22. Run Program
  23. Diag_DnL
  24.     Diag Dn-L
  25. Diag_DnR
  26.     Diag Dn-R
  27. Down_50
  28. &Down
  29. Up_50
  30. Clear
  31. $    ColorFill
  32. Color Fill
  33. Scribble
  34. Scribble
  35. Diag_UpL
  36.     Diag Up-L
  37. Diag_UpR
  38.     Diag Up-R
  39. Backward_50
  40.     &Backward
  41. Forward_50
  42. &Forward
  43. Draw_A_Star
  44. Draw a &Star
  45. Label2
  46. Slope
  47. Label3
  48. Single Line Entry
  49. Label1
  50. Distance
  51. i    FilePrint
  52. OpenCmdFile
  53. Open Command File
  54. SaveCmdFile
  55. Save Command File
  56. DisplayHelp
  57.     Help (F1)
  58. HelpQuickTour
  59. Quick Tour
  60. HelpCommands
  61. Commands
  62. HelpRegistration
  63. Registration
  64. p    HelpAbout
  65. About 
  66. ColorZ
  67. TextBoxLine
  68. CommandLine
  69. CommandWord
  70. aarray
  71. jarray,
  72. karray
  73. marray"
  74. narray
  75. DrawNow
  76. ScribbleOn
  77. LineNumberq
  78. CharPosU
  79. GetFocus
  80. SendMessage
  81. hWndz
  82. wMsgz
  83. wParamm
  84. lParam
  85. Command2_Click
  86. Form1
  87. Draw_A_Star_Click
  88. Slope
  89. SlopeBox;
  90. Distancea
  91. Picture1 
  92. WriteToProgramBox
  93. Forward_50_Click
  94. Forward
  95. @    Clr_Click
  96. DefaultX
  97. DefaultYL
  98. Up_50_ClickR
  99. Down_50_ClickI
  100. FirstArg
  101.     SecondArg
  102. @    Form_Loade
  103.     LineColor
  104. BLUEA
  105. Valuee
  106.     ForeColorW
  107.     drawwidth
  108. Old_X
  109. Old_Y
  110. Option5i
  111. FALSE
  112. Option1_Click
  113. Option2_Click'
  114. Option3_Click8
  115. Option4_Click
  116. Option5_Clicks
  117. Blue_Click,
  118. Green_Click
  119. @    Red_Click
  120. Black_Click=
  121. White_ClickV
  122. SelColor
  123. ColorFill_Click*    
  124.     BackColor
  125. GREENJ
  126. Black
  127. White
  128. Diag_UpR_Click
  129. DiagUpRight 
  130. Diag_UpL_Click2
  131. DiagUpLeftB
  132. Diag_DnL_ClickT
  133. DiagDownLeft
  134. Diag_DnR_Click{
  135. DiagDownRight
  136. Picture1_MouseDown
  137. Button,
  138. Shift
  139. MouseX
  140. MouseY2
  141. Finish
  142. ProgramBox
  143. Scribble_Click
  144. Scribble
  145. Caption
  146. Picture1_MouseUp
  147. Picture1_MouseMoveo
  148. Run_Program_Click{
  149. GetLineCount
  150. GetLine
  151. RunCommands
  152. GetSel
  153.     EM_GETSEL
  154. location
  155. endingn
  156. starting
  157. EM_GETLINECOUNT
  158. MAX_CHAR_PER_LINE8
  159. EM_GETLINE
  160. Buffer0
  161. LineFromChar
  162. EM_LINEFROMCHAR
  163. MaxNum}
  164. BackwardS
  165. MinNum
  166. Backward_50_Click
  167. EndOfFrameReachedS
  168. New_Y
  169. New_X
  170. PrintPicture_Click-
  171. TestBox_KeyPress
  172. KeyAscii
  173. TestBox
  174. ParseCommandLine
  175. EndProc!
  176. Action:    @
  177. SlopeBox_Change
  178.     MAXIMIZED
  179. WindowState
  180. FileOpener
  181.     NametoUse
  182.     RecordLen
  183. FileOpen
  184. FileNumF
  185. openerrroru    
  186.     OpenErrorb
  187. REPLACEFILE
  188. READFILEk
  189.     ADDTOFILE_    
  190. RANDOMFILE
  191. BINARYFILE
  192.     FileError
  193.     ErrorCode 
  194. msgTypex
  195. MB_EXCLAIM7
  196. Err_DeviceUnavailable"
  197. Err_DiskNotReadyJ
  198. Err_InternalDiskError
  199. Err_DeviceIO
  200. Err_DiskFull
  201. Err_BadFilenamem    
  202. Err_BadFileNameOrNumber
  203. Err_PathDoesNotExist
  204. Err_BadFileMode
  205. Err_FileAlreadyOpen
  206. Err_InputPastEndOfFile~    
  207. Response
  208. RecordLength
  209. OpenCmdFile_Click
  210. SaveCmdFile_Click
  211. WriteError
  212. FileErrors
  213. SaveFileProc
  214. OpenCloseRoutine6
  215. OpenCloseDemoS
  216. TestStringF
  217. Fname
  218.     REEADFILE
  219. DisplayHelp_Click
  220. HelpRegistration_Click
  221. OutputString
  222. Quit_Click
  223. Pictureb
  224. Image
  225. Form2
  226. Picture1End
  227. Form_Unload
  228. Cancel
  229. Screen
  230. MousePointer
  231.     ReadError
  232. WriteErrors
  233. creen
  234.     WRITEFILE
  235.     InputName
  236. HelpCommands_Click
  237.     HelpTopic
  238. StartSearch
  239. HelpQuickTour_Click
  240. HelpAbout_Click
  241. Draw_A_Star
  242. DrawStar
  243.  arrays used for testing parsing procedure
  244. user;
  245. Backward
  246.  ** Move to left **
  247. Backward_50_Click
  248. Black_Click
  249. Black
  250. Blue_Click
  251. Clr_Click
  252. ColorFill_Click
  253. Command2_Click
  254. Diag_DnL_Click
  255. Diag_DnR_Click
  256. Diag_UpL_Click
  257. Diag_UpR_Click
  258. DiagDownLeft
  259.  ** upper left to lower right (-x,+y)  **=
  260.  ** 2X slope - 1.0 / .5 **
  261. stop loop if end of picture frame is reached
  262. min X (far left of frame)r
  263. max Y (bot of frame)
  264.  Can't reset value of I until positions of x and y are
  265.  checked, otherwise setting I in first if statementa
  266.  may cause second if statement to execute also
  267.  reset both points to full distance only if edges of frame not reached
  268. DiagDownRight
  269.  ** upper left to lower right (+x,+y)  **i
  270.  ** 2X slope - 1.0 / .5 **
  271. stop loop if end of picture frame is reached
  272. min X (far right of frame)
  273. max Y (bot of frame)
  274.  Can't reset value of I until positions of x and y are
  275.  checked, otherwise setting I in first if statementa
  276.  may cause second if statement to execute also
  277.  reset both points to full distance only if edges of frame not reached
  278. DiagUpLeft
  279.  ** lower left to upper middle (+x,-y)  **
  280.  ** 2X slope - 1.0 / .5 **
  281. stop loop if end of picture frame is reached
  282. min X (far left of frame)r
  283. min Y (top of frame)
  284.  Can't reset value of I until positions of x and y are
  285.  checked, otherwise setting I in first if statementa
  286.  may cause second if statement to execute also
  287.  reset both points to full distance only if edges of frame not reached
  288. DiagUpRight
  289.  add slope to form and here slope 2 = 1/slope = .5
  290.  ** lower left to upper middle (+x,-y)  **
  291.  ** 2X slope - 1.0 / .5 **
  292. stop loop if end of picture frame is reached
  293. max X (far right of frame)
  294. min Y (top of frame)
  295.  Can't reset value of I until both expressions are
  296.  checked, otherwise setting I in first if statement
  297.  would cause second if statement to execute also
  298.  reset both points to full distance only if edges of frame not reached
  299.  ** Move down **
  300. Down_50_Click
  301. Draw_A_Star_Click
  302. DrawStar
  303.  ** lower left to upper middle (+x,-y) 120,180 to 140,120  ***
  304.  ** 3X slope - 1.5 / .5 **
  305.  ** upper middle to lower right (+x,+y) 140,120 to 160,180  **
  306.  ** lower right to upper left(-x,-y) 160,180 to 120,140  ** 
  307.  ** straight across left to right(+x,=y) 120,140 to 160,140  **
  308.  ** upper left to lower right(-x,+y) 160,140 to 120,180  ** 
  309. Form_Load
  310.  Defines new line character
  311. Form_Unload
  312. Forward
  313.  ** Move to right **
  314. Forward_50_Click
  315. GetLine
  316. * This function returns a line of text specified by LineNumber
  317. * from the edit control. The first line starts at zero.e
  318. GetLineCount
  319. GetSel
  320. * This function returns the starting/ending position of the
  321. * current selected text.  This is the current location of the
  322. * cursor if start is equal to ending. 
  323. * LOWORD-start position of selected text
  324. * HIWORD-first no selected textc
  325.    aGetSel.Caption = "Caret Location = " + Str$(starting%)
  326. Green_Click
  327. Green
  328. HelpAbout_Click
  329. Introduction
  330. HelpCommands_Click
  331. Command
  332. HelpQuickTour_Click
  333. Quick Tour
  334. HelpRegistration_Click
  335. Registration
  336. LineFromChar
  337. * This function will return the line number of the line that
  338. * contains the character whose location(index) specified in the
  339. * third argument of SendMessage.  If the third argument is -1,
  340. * then the number of the line that contains the first character
  341. * of the selected text is returned.  Line numbers start at zero.
  342.    aLineFromChar.Caption = "Current Line = " + Str$(Pos%)t
  343. OpenCloseRoutine
  344. Open Statement Example
  345. Enter File Name:
  346. File Name
  347.  Determine next file number.
  348.  change to hourglass
  349.  Write string to file.
  350.  Close all files. 
  351.  File was successful saved - 
  352.  Error Writing File 
  353. Save File
  354.  Error Reading File 
  355. File Open
  356. OpenCmdFile_Click
  357. Option1_Click
  358. Option2_Click
  359. Option3_Click
  360. Option4_Click
  361. Option5_Click
  362. ParseCommandLine
  363.  current position
  364.  start of next word
  365.  position of last comma
  366.  current word in array
  367.  Mid$ syntax (string, from pos, for length)a
  368.  only parse if current position is a comma and lasth
  369.  position was not a spaces
  370.  write last command word when end of string is reached
  371.  k = position of last commat
  372. Picture1_MouseDown
  373. Picture1_MouseMove
  374. Ideas - Change Mouse pointer to a paintbrush when scribbleon
  375.      and positioned within picture box
  376.  Limit drawing to within picture box - see ClipCursorb
  377.      API call in "Visual Basics #17"
  378. X = MouseX
  379. Y = MouseY
  380. Picture1_MouseUp
  381. Quit_Click
  382. Red_Click
  383. Run_Program_Click
  384.  The following code performs the following functions:o
  385.  1 - determines the number of lines in the program box
  386.  2 - Loops through the code and enters a Caseo
  387.      statement which sets the proper parameterss
  388.      (color and distance) and executes the proper
  389.      Control
  390. This would provide input into the loop which would process
  391.  "commands" in the text box. It returns the number of lines
  392.  in the text2 box.
  393.  GetSel determines the starting and ending
  394.   position of the selected text 
  395. CharPos& = GetSel()e
  396. LineFromChar uses the character postion returned by GetSel
  397.  to return the line number in the text2 boxu
  398. LineNumber& = LineFromChar(CharPos&)
  399.  GetLine returns the text on the line number specified byl
  400.  the LineNumber variable. 
  401. RunCommands
  402. Parses Commands, right and left trims and converts to upper case
  403. BLACK
  404. GREEN
  405. WHITE
  406. Distance cannot be greater than 99. Please re-enter
  407. SaveCmdFile_Click
  408. Scribble_Click
  409. Scribble Off
  410. Scribble On
  411. SelColor
  412. Green
  413. Black
  414. White
  415. SlopeBox_Change
  416. Slope cannot be greater than 99. Please re-enter
  417. TestBox_KeyPress
  418.  Execute Commands in test box when enter is pressedf
  419.  A space must be added to end of command line to prevent
  420.  parsing problemsa
  421.  Save text box commands to program box
  422. ** Move Up**
  423. Up_50_Click
  424. White_Click
  425. White
  426. WriteToProgramBox
  427.