home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / tinycalc / tyncalc.fr1 (.txt) < prev    next >
Visual Basic Form  |  1995-02-27  |  8KB  |  158 lines

  1. Form1
  2. TYNEE
  3. Form1%
  4. cancelentry
  5. Cancel
  6. Command1
  7. Command6
  8. Paste
  9. Command2
  10. Picture1
  11. Command5
  12. readout
  13. Form_Click
  14. @    form_load0
  15. text1F
  16. text1_SetFocusb
  17. Text1_Change
  18. Text1_GotFocusT
  19. picture1
  20. height
  21. width
  22. Picture1_Click~
  23. picture'
  24. picture1_mousedown$
  25. buttonU
  26. Shift]
  27. pring\
  28. pplat
  29. yThenA
  30. ctotal
  31. label1
  32. caption 
  33.     recvd_key
  34. Text1_KeyDown
  35. KeyCode
  36.     cfunction
  37. clearall
  38. Text2_Change    
  39. Label2_Click
  40. Label2_MouseDown|
  41. Label3_Click
  42. clearentry;
  43. function_pressedL
  44. slash
  45. minus
  46. equal
  47. lastplatY
  48. cvalue
  49. Label1_Click
  50. Label1_MouseDown
  51. Label3_MouseDown
  52. cfunction_pressed
  53.     lastfunct
  54. caccum0
  55.     lfunctionK
  56.     functdone
  57. accum
  58.     cfungtiono
  59. lastopr
  60. neonM
  61. oflow
  62. oflow2
  63. priorfunctE
  64. prioropr
  65. cfunct
  66. Command1_Click=
  67. form1"
  68. minimize
  69. TRUEZ
  70. windowstate
  71. Command3_Click
  72. Command4_Click
  73. Form_MouseMove
  74. elseifIf+
  75. Command5_Click
  76.     clipboard
  77. cf_text
  78. cf_linkc
  79. Command6_Click
  80. gotclipk
  81.     noinifile
  82. form2v
  83. loadf
  84. visible
  85. Command2_Click
  86. FALSE]
  87. decimalflag
  88. numops
  89.     lastinput
  90. opflag
  91. Cancel_Click
  92. readout
  93. decimal_click
  94. cancelentry_Click
  95. operator_click
  96.     lasttotal
  97. incountU
  98. decimal
  99. number_click
  100. times|
  101. opcode
  102. where_place
  103. xplace
  104. yplace
  105. hplace
  106. indata
  107. Tynee
  108. inifile
  109. noinifile2
  110. bottom
  111. pgrid`
  112. I copied most of the code from the calculator sample thatt
  113. was provided with VB from Microsoft (why rewrite it?))
  114. There is a different slant to this program in that I use a
  115. picture instead of buttons for the numbers and operands.
  116. I drew the keyboard in PBRUSH, trying to keep the rows and
  117. columns equal in size.  When I got it into the form as
  118. a picture, I found that it was very close (in twips) too
  119. having each row be the same height and each column being
  120. the same width.  This enabled me to be able to write the
  121. simple FOR...NEXT code in Picture1_Mousedown.
  122. Subroutine picture1_mousedown shows how I partition thee
  123. picture into "grids" to determine which numbers or operands
  124. were under the mouse when it was clicked..
  125. Mike Wilson CIS 71261,63 August 1991
  126. row, column -- top left to bottom 
  127. Cancel_Click
  128. cancelentry_Click
  129. Command1_Click
  130. save the top & left location of the form when minimized 
  131. TYNEE.INI
  132. [Tynee]
  133. minimize
  134. Command2_Click
  135. Command5_Click
  136. copy readout to win clipboardo
  137. Command6_Click
  138. retrieve text (hopefully a numeric string) from win clipboard
  139. call rte that processes numbersr
  140. decimal_click
  141. form_load
  142. read the .ini file -- if error, place it in default area
  143. tynee.ini
  144. number_click
  145. operator_click
  146. Can't divide by zero
  147. Tynee
  148. picture1_mousedown
  149. picture1 is divided into 4 rows and 4 columns of equal twips
  150. find row that mouse was clicked on; height of row is 229 twips
  151. tell which row i.e. 40 =row 4
  152. col width is 151 twips; find column that mouse was clicked on
  153. add column to row*10
  154. i.e. row 4, col 1 (O) is 41*
  155. an operand
  156. rest are numbers
  157. go process the number
  158.