home *** CD-ROM | disk | FTP | other *** search
/ Wacky Windows Stuff... / WACKY.iso / toolbook / resize.tbk (.txt) < prev    next >
Asymetrix ToolBook File  |  1992-02-25  |  22KB  |  237 lines

  1. System
  2. Arial
  3. resized
  4. Arial
  5. Times
  6. fD|D|
  7. Tms Rmn
  8. Arial
  9. gD|D|
  10. fontsyle
  11. times
  12. Enter the original resolution in the fields above.  Current resolution and aspect ratio are calculated for you.
  13. resize
  14. sizeToDisplay
  15. buttonUp
  16. buttonUp
  17. gsizeToDisplay
  18. Resize
  19. viewScript
  20. buttonUp
  21. buttonUp
  22. View Script
  23. equals
  24. aspectLabel
  25. Current Res   /  Original Res    =    Aspect Ratioo
  26. equals
  27. equals
  28. overType
  29. false
  30. Click on the Resize button to test.  The scripts for this are in the book script.  The 2 fields below are used to compare the current screen resolution against the original resolution and set up an aspect ratio for the resizing.  Fonts will be resized as well, if possible.  (If groups are encountered, a recursive handler is called in case there are nested groups.)  For best results, use a font such as Helv for field text and button labels rather than the System font, which is not resizable.  **MORE**groups are not checked for).
  31. "more"
  32. buttonUp
  33. buttonUp
  34. hRes 
  35. "xAspect"
  36. "Not a 
  37. z: " & 
  38. leaveField
  39. leaveField
  40. xAspect
  41. Not a number: 
  42. vRes 
  43. "yAspect"
  44. "Not a 
  45. z: " & 
  46. leaveField
  47. leaveField
  48. yAspect
  49. Not a number: 
  50. xAspect
  51. yAspect
  52. buttonUp
  53. buttonUp
  54. One enhancement you will want to make to ensure that your book is completely usable after resizing is to test for the textOverflow of all of the fields.  If the textOverflow of the field is not null, set its borderStyle to scrolling.  (Click to dismiss)
  55. howToUseThisBook
  56. "Copy the 
  57. your 
  58. Fmodify" & CRLF & \
  59. 2comments therein.
  60. You would 
  61. Fneed 
  62. dtwo user-defined 
  63. ""orgX 
  64.             """orgY 
  65. resolutions 
  66. computer on which" & 
  67. 8was developed.
  68. (e.g., 640 
  69. 480, respectively)" & 
  70.             "Written 
  71. HDan Lahey.
  72. Copyright (c) 1992, Asymetrix Corp."
  73. buttonUp
  74. buttonUp
  75. Copy the script of this book into your application, then modify
  76. the script per the comments therein.  You would then need to set
  77. the two user-defined properties "orgX of this book" and
  78. "orgY of this book" to the resolutions of the computer on which
  79. the book was developed.  (e.g., 640 and 480, respectively)
  80. Written by Dan Lahey.  Copyright (c) 1992, Asymetrix Corp.
  81. How To Use This Book
  82. This is a different background.
  83. This is page 2
  84. This field is part of a group.
  85. This field is grouped with the group.to show 
  86. This is page 3
  87. -- THIS IS NOT NECESSARY
  88. -- IT WAS INCLUDED TO KEEP ME
  89. -- FROM MESSING THE BOOK UP
  90. -- DURING DEVELOPMENT
  91. 'NEXT LINE IS FOR 
  92. 8ONLY
  93.     linkDLL "tbkwin.dll"
  94.         INT horizontalDisplayRes()
  95. verticalDisplayRes()
  96. 3xUnitsFromPixels(
  97. LyUnitsFromPixels(
  98. hRes 
  99. nes()
  100. vRes 
  101.     -- HERE IS HOW YOUR ENTERBOOK HANDLER SHOULD READ
  102.     -- TO TEST 
  103. AGAINST 
  104. CURRENT RESOLUTION
  105.     -- IN 
  106. TDISTRIBUTION 
  107. 8<> orgX 
  108.     --            
  109. 8<> orgY 
  110. 8-- NEED TO RESIZE
  111.     --        
  112. sizeToDisplay
  113. -- NO 
  114.     --        unlinkDLL "
  115.     -- ...TO 
  116. (SEE 
  117. NOTE BELOW ABOUT 
  118. FORWARD COMMAND)
  119. REST OF 
  120. IS UNNECESSARY IF YOU HAVE USER-DEFINED
  121.     -- PROPERTIES NAMED 
  122. 8(RATHER THAN
  123.     -- USING 
  124. TEXT OF 
  125. FIELDS IN 
  126.  handler).
  127. HORIZONTAL 
  128.  VERTICAL
  129. , RESPECTIVELY, OF 
  130. COMPUTER ON WHICH 
  131. APP WAS
  132.     -- DEVELOPED. 
  133. "Not a 
  134. z: " & 
  135. xAspect
  136. z: " & 
  137. yAspect
  138.     -- YOU'LL 
  139. A SYSTEM 
  140. WITH AN 
  141. Z,ULX,ULY,LRX,LRY
  142. TWO LINES 
  143. BE REMOVED IF 
  144. USERPROPERTIES
  145. 8AND 
  146. 8ARE 
  147. SCRIPT 
  148. BE MODIFIED AS INDICATED
  149. --     |
  150. FOLLOWING ERROR CHECKING IS 
  151. z: " & 
  152. z: " & 
  153.     -- ...TO 
  154.         -- 
  155. PRECEDING 
  156. MADE IN 
  157.         -- 
  158. , IT 
  159. ASSOCIATED 
  160. STATEMENT 
  161.         -- BE 
  162. COMMENTS
  163. <-| BEFORE "
  164. orgSize 
  165. sBackground
  166. resize(
  167. groupResizeText(
  168. backGround 
  169. objName 
  170. " && 
  171.         -- 
  172.  bnds
  173. xDelta 
  174. 1 + ((
  175.  - 1) * ((
  176. 3 - ULX) / (
  177. yDelta 
  178. 1 + ((
  179.  - 1) * ((
  180.  - ULY) / (
  181. 1 + ((
  182.      - 1) * ((
  183. 1 + ((
  184. C     - 1) * ((
  185. A RECURSIVE 
  186. TO DEAL 
  187. w    NESTED GROUPS
  188. -- RECURSE
  189. enterBook
  190. sizeToDisplay
  191. resize
  192. groupResizeText
  193. enterBook
  194. tbkwin.dll
  195. horizontalDisplayRes
  196. verticalDisplayRes
  197. xUnitsFromPixels
  198. yUnitsFromPixels
  199. horizontalDisplayRes
  200. verticalDisplayRes
  201. Not a number: 
  202. Not a number: 
  203. yAspect
  204. xAspect
  205. sizeToDisplay
  206. Not a number: 
  207. Not a number: 
  208. xUnitsFromPixels
  209. yUnitsFromPixels
  210. xUnitsFromPixels
  211. yUnitsFromPixels
  212. resize
  213. field
  214. groupResizeText
  215. resize
  216. field
  217. groupResizeText
  218. recordField
  219. sizeToPage
  220. objName
  221. z:to1
  222. i:to1
  223. sBackground
  224. orgSize
  225. xAspect
  226. yAspect
  227. resize
  228. yDelta
  229. xDelta
  230. xAspect
  231. yAspect
  232. groupResizeText
  233. field
  234. groupResizeText
  235. yAspect
  236. #($($
  237.