home *** CD-ROM | disk | FTP | other *** search
/ Wacky Windows Stuff... / WACKY.iso / toolbook / dlgtrick.tbk (.txt) < prev    next >
Asymetrix ToolBook File  |  1992-02-12  |  40KB  |  1,129 lines

  1. winCLI
  2. false
  3. -5,0,643,99
  4. enterBook
  5. enterBook
  6. cel Examples
  7. Dialog Tricks
  8. "&Move" 
  9. "Si&ze" 
  10. "&Activate" 
  11. "Build &Chart" 
  12. "&Protect" 
  13.  &Document" 
  14. "&Unprotect" 
  15. buildChart
  16. protectDocument
  17. unprotect
  18. unprotectDocument
  19. enterBook
  20. activate
  21. buildChart
  22. start
  23. protect
  24. protectDocument
  25. initMenu
  26. unprotect
  27. unprotectDocument
  28. enterBook
  29. tinitMenu
  30. initMenu
  31. E&xcel
  32. &Start
  33. Excel
  34. &Move
  35. Excel
  36. Si&ze
  37. Excel
  38. &Activate
  39. Excel
  40. Build &Chart
  41. Excel
  42. &Protect
  43. Excel
  44. Protect &Document
  45. Excel
  46. &Unprotect
  47. Excel
  48. Unprotect D&ocument
  49. Excel
  50. start
  51. activate
  52. buildChart
  53. protect
  54. protectDocument
  55. unprotect
  56. unprotectDocument
  57. ~&"!i&U
  58. "*$*$*$
  59. sqlCommand
  60. select * from ps_vm.v0000015
  61.     --Move linkDLL statement 
  62. handler
  63. "tbkdlg.dll"
  64. dialog(
  65. setValue(
  66. getValue(
  67. init 
  68. dlgInit 
  69.     --    Here 
  70. where we modify the 
  71. control's style, which we've 
  72.     --        calculated 
  73. dlgBox 
  74.     --    We will 
  75. ,"","")
  76. function
  77. retValue 
  78. , "")
  79. buttonUp
  80. buttonUp
  81. tbkdlg.dll
  82. dialog
  83. setValue
  84. getValue
  85. dlgInit
  86. dlgBox
  87. dialog
  88. retValue
  89. dlgInit
  90. ,e6,Edit
  91. button OK,b7,TRUE
  92. button Cancel,b8,FALSE
  93. ,b9,TRUE
  94. ,b10,FALSE
  95. ,b11,FALSE
  96. dlgBox
  97. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  98. ctrlID
  99. Password Edit Control
  100.     --Move linkDLL statement 
  101. handler
  102. "tbkdlg.dll"
  103. dialog(
  104. setValue(
  105. getValue(
  106. init 
  107. dlgInit 
  108.     --    Here 
  109. where we modify the 
  110. control's style, which we've 
  111.     --        calculated 
  112. dlgBox 
  113.     --    We will 
  114. ,"","")
  115. function
  116. retValue 
  117. , "")
  118. buttonUp
  119. buttonUp
  120. tbkdlg.dll
  121. dialog
  122. setValue
  123. getValue
  124. dlgInit
  125. dlgBox
  126. dialog
  127. retValue
  128. dlgInit
  129. ,e6,Edit
  130. button OK,b7,TRUE
  131. button Cancel,b8,FALSE
  132. ,b9,TRUE
  133. ,b10,FALSE
  134. ,b11,FALSE
  135.     dlgBox
  136. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  137. ctrlID
  138. Uppercase Edit Control
  139.     --Move linkDLL statement 
  140. handler
  141. "tbkdlg.dll"
  142. dialog(
  143. setValue(
  144. getValue(
  145. init 
  146. dlgInit 
  147.     --    Here 
  148. where we modify the 
  149. control's style, which we've 
  150.     --        calculated 
  151. dlgBox 
  152.     --    We will 
  153. ,"","")
  154. function
  155. retValue 
  156. , "")
  157. buttonUp
  158. buttonUp
  159. tbkdlg.dll
  160. dialog
  161. setValue
  162. getValue
  163. dlgInit
  164. dlgBox
  165. dialog
  166. retValue
  167. ctrlID
  168. dlgBox
  169. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  170. dlgInit
  171. ,e6,Edit
  172. button OK,b7,TRUE
  173. button Cancel,b8,FALSE
  174. ,b9,TRUE
  175. ,b10,FALSE
  176. ,b11,FALSE
  177. Lowercase Edit Control
  178. Dialog
  179.     --Move linkDLL statement 
  180. handler
  181. "tbkdlg.dll"
  182. dialog(
  183. setValue(
  184. getValue(
  185. init 
  186. dlgInit 
  187.     -- Fill the listbox 
  188. lines containing spaces 
  189. separate 
  190. textLineString 
  191. "1st Col
  192.  3rd 
  193. "First
  194. Second
  195. Third" &
  196. 3rd" &
  197. \ 3" &
  198. Two Three"
  199. retValue 
  200. dlgBox 
  201. %, "")
  202. function
  203. buttonUp
  204. buttonUp
  205. tbkdlg.dll
  206. dialog
  207. setValue
  208. getValue
  209. dlgInit
  210. 1st Col  2nd Col 3rd Col
  211. First  Second  Third
  212. 1st  2nd  3rd
  213. Col 1  Col 2  Col 3
  214. One  Two Three
  215. listbox list
  216. setValue
  217. dlgBox
  218. dialog
  219. retValue
  220. textLineString
  221. dlgInit
  222. listbox list,l5,one
  223. three
  224. ,b6,TRUE
  225. ,b7,FALSE
  226. dlgBox
  227. 524480,3,30,20,142,128,,,Dialog,8,Helv,list,11.05,8.70,117.60,72.37,5,1352728577,131,ctrlText,0,,11.05,91.12,50.86,12.31,6,1342242817,128,OK,0,,77.90,91.12,50.86,12.31,7,1342242816,128,Cancel,0
  228. ctrlID
  229. Normal Listbox
  230. Dialog
  231.     --Move linkDLL statement 
  232. handler
  233. "tbkdlg.dll"
  234. dialog(
  235. setValue(
  236. getValue(
  237. init 
  238. dlgInit 
  239. dlgBox
  240.     -- The listbox style 
  241. the 18th 
  242.     -- We will 
  243. #LBS_USETABSTOPS value 
  244.     -- Fill 
  245. lines containing tabs 
  246. separate 
  247. textLineString 
  248. "1st Col" &
  249. 9& "2nd 
  250. 9& "3rd 
  251. "First" &
  252. 9& "Second" &
  253. 9& "Third" &
  254. "1st" &
  255. 9& "2nd" &
  256. 9& "3rd" &
  257. v 1" &
  258.  2" &
  259.  3" &
  260. "One" &
  261. 9& "Two" &
  262. 9& "Three"
  263. retValue 
  264. box, 
  265. , "")
  266. function
  267. buttonUp
  268. buttonUp
  269. tbkdlg.dll
  270. dialog
  271. setValue
  272. getValue
  273. dlgInit
  274. dlgBox
  275. 1st Col
  276. 2nd Col
  277. 3rd Col
  278. First
  279. Second
  280. Third
  281. Col 1
  282. Col 2
  283. Col 3
  284. Three
  285. listbox list
  286. setValue
  287. dialog
  288. retValue
  289. textLineString
  290. ctrlID
  291. dlgBox
  292. 524480,3,30,20,142,128,,,Dialog,8,Helv,list,11.05,8.70,117.60,72.37,5,1352728577,131,ctrlText,0,,11.05,91.12,50.86,12.31,6,1342242817,128,OK,0,,77.90,91.12,50.86,12.31,7,1342242816,128,Cancel,0
  293. dlgInit
  294. listbox list,l5,one
  295. three
  296. ,b6,TRUE
  297. ,b7,FALSE
  298. Tab Stop Listbox
  299. Dialog
  300.     --Move linkDLL statement 
  301. handler
  302. "tbkdlg.dll"
  303. dialog(
  304. setValue(
  305. getValue(
  306. init 
  307. dlgInit 
  308. dlgBox 
  309.     -- The 
  310. style 
  311. the 1st 
  312.     -- We will 
  313. !WS_SYSMENU value 
  314. H524288
  315. ,"","")
  316. function
  317. retValue 
  318. , "")
  319. buttonUp
  320. buttonUp
  321. tbkdlg.dll
  322. dialog
  323. setValue
  324. getValue
  325. dlgInit
  326. dlgBox
  327. dialog
  328. retValue
  329. ctrlID
  330. dlgBox
  331. 524480,3,30,20,142,128,,,Dialog,8,Helv,list,11.05,8.70,117.60,72.37,5,1352728577,131,ctrlText,0,,11.05,91.12,50.86,12.31,6,1342242817,128,OK,0,,77.90,91.12,50.86,12.31,7,1342242816,128,Cancel,0
  332. dlgInit
  333. listbox list,l5,one
  334. three
  335. ,b6,TRUE
  336. ,b7,FALSE
  337. No System Menu
  338. Dialog
  339.     --Move linkDLL statement 
  340. handler
  341. "tbkdlg.dll"
  342. dialog(
  343. setValue(
  344. getValue(
  345. init 
  346. dlgInit 
  347. dlgBox 
  348.     -- The 
  349. the 9th 
  350. ("Please Title 
  351. *Dialog 
  352. f"New Caption"
  353. ,"","")
  354. function
  355. retValue 
  356. , "")
  357. buttonUp
  358. buttonUp
  359. tbkdlg.dll
  360. dialog
  361. setValue
  362. getValue
  363. dlgInit
  364. dlgBox
  365. Please Title the Dialog Box.
  366. New Caption
  367. dialog
  368. retValue
  369. !J!dlgInit
  370. listbox list,l5,one
  371. three
  372. ,b6,TRUE
  373. ,b7,FALSE
  374. !dlgBox
  375. 524480,3,30,20,142,128,,,Dialog,8,Helv,list,11.05,8.70,117.60,72.37,5,1352728577,131,ctrlText,0,,11.05,91.12,50.86,12.31,6,1342242817,128,OK,0,,77.90,91.12,50.86,12.31,7,1342242816,128,Cancel,0
  376. |"ctrlID
  377. Settable Caption
  378. Dialog
  379.     --Move linkDLL statement 
  380. handler
  381. "tbkdlg.dll"
  382. dialog(
  383. setValue(
  384. getValue(
  385. init 
  386. dlgInit 
  387. dlgBox 
  388.     -- The 
  389. style 
  390. the 1st 
  391.     -- We will 
  392. !DS_SYSMODAL value 
  393. ,"","")
  394. function
  395. retValue 
  396. , "")
  397. buttonUp
  398. buttonUp
  399. tbkdlg.dll
  400. dialog
  401. setValue
  402. getValue
  403. dlgInit
  404. dlgBox
  405. dialog
  406. retValue
  407. :%2%ctrlID
  408. &J%dlgBox
  409. 524480,3,30,20,142,128,,,Dialog,8,Helv,list,11.05,8.70,117.60,72.37,5,1352728577,131,ctrlText,0,,11.05,91.12,50.86,12.31,6,1342242817,128,OK,0,,77.90,91.12,50.86,12.31,7,1342242816,128,Cancel,0
  410. "&dlgInit
  411. listbox list,l5,one
  412. three
  413. ,b6,TRUE
  414. ,b7,FALSE
  415. System Modal / Unmovable
  416. --    This presents a list 
  417. saved queries 
  418. the user, 
  419. loads 
  420. --    selected one 
  421. #appropriate 
  422. loadQuery
  423. 4svQueryName, svQueryDesc
  424. pickAQuery("Load")
  425. "queryChoice 
  426. :" && 
  427.         --&
  428. parseQuery 
  429. deletes 
  430. deleteQuery
  431. Delete")
  432. "ok" = tbMessageBox("
  433. :" && 
  434. & "?", \
  435. ","okCancel",1,"question")
  436.         --&
  437. deleteIniLine("Queries",
  438. "Deleting 
  439. :" && 
  440. utility function 
  441. --        returns 
  442.  action
  443.     linkDLL "kernel"
  444. GetPrivateProfileString\
  445. GetProfileList=
  446. gGlobalAlloc(
  447. gGlobalFree(
  448. GlobalLock(
  449. gglobalUnlock(
  450. .ini 
  451. fileName 
  452. getIniFile()
  453.     --    Use a 10K buffer
  454. bufferSize 
  455. 10240
  456. hMem 
  457. There 
  458. xenough memory 
  459. perform 
  460. ", "ok", 1, "exclam")
  461. "Failed: Not 
  462.     --    Get a 
  463. 0,"",
  464.     --    Work thru <
  465. >, a series 
  466. queryNames, forming queryList.
  467.     --    Each 
  468. terminated 
  469. Ha 0, so we can use 
  470. ) + 1)
  471. >, a 
  472. g choiceList,
  473.     --    a 
  474. descriptions.
  475.  will choose 
  476. tempList 
  477.         --    
  478. queryDesc 
  479. 1(0, 
  480.  && "-" && 
  481. GlobalUnlock(
  482.     --    Build 
  483. title 
  484. listbox, 
  485. "<AppName> &
  486. listboxTitle 
  487. stripExt(
  488. 8) && "&
  489. listQueriesDialog(100, 50, 
  490. f, "&"&
  491.         --    Split 
  492. " - """
  493. ~(" - """, 
  494. - 1) 
  495. + 3) 
  496.  & CRLF & 
  497. reads 
  498. parses a given 
  499.  "<bookname>.ini"
  500. 's windows directory.
  501. values 
  502. queryLine 
  503. getIniLine("
  504. queryPage 
  505. fieldList 
  506. valueList 
  507.     --    Put 
  508. proper fields
  509. fieldName
  510. fieldValue
  511. sqlCommand 
  512. queryCmnd
  513.     -- Take 
  514. default
  515.     asks 
  516.     current 
  517. stores 
  518. , along 
  519. --    "<
  520. saveQuery
  521.     Please 
  522. that 
  523. _", \
  524.  "Save 
  525. d", "ok", 1, "
  526. init 
  527. setValue(
  528. retValue 
  529. dialog(
  530. getValue(
  531. Description"
  532. printMsg "Saving 
  533. """ & 
  534. sqlFieldList 
  535. , tmpList
  536.  & """,""" & 
  537. & """,""" & \
  538. & """,""" & 
  539. & """,""" & 
  540. WritePrivateProfileString(
  541. writeIniLine("
  542. Error: Couldn't 
  543.  "ok", 1, "
  544.     --    Strip 
  545. extension 
  546. stringStart 
  547. stringEnd 
  548. stringPeriod 
  549.     --    Create 
  550. +     x, y, dbCaption, lbTitle, lbTextLines, buttonCaption1, buttonCaption2
  551. tbkdlg.dll"
  552.     -- Test parameters
  553. lines 
  554.  (no more than 11)
  555. numLines 
  556. j(11, 
  557. call 
  558. following two statements
  559. q    needed 
  560. display a 
  561.  box.
  562. They define
  563. fa static control, a 
  564. OK & 
  565.     --    buttons. 
  566. dlgBox 
  567. dlgInit 
  568. are documented on 
  569.     --    82-83 
  570. ToolBook 1.5 release notes.
  571. "524480,4," & x & "," & y & ",156," & 56+
  572. *8 & \
  573. ",,," & 
  574. ",8,Helv,,12,8,132,9,6,1342177280,130,,0,LB,12,18,132," & \
  575. *8 & ",7,1352728579,131,ctrlText,0,OK,17," & \
  576. *8 & ",51,13,8,1342242817,128," & \
  577.  & ",0,
  578. ,88," & 26+
  579. *8 & \
  580. ",51,13,9,1342242816,128," & 
  581.  & ",0"
  582. ",s6," & 
  583.  LB,l7," & 
  584. BOK,b8,TRUE
  585. ,b9,FALSE"
  586.  LB")
  587.     unlinkDLL "
  588. loadQueryX
  589. Loading 
  590. """ & 
  591. 64, 1024)
  592. ", "ok", 1, "
  593. length 
  594. ,1024,
  595. our way 
  596. >, a 
  597. Ha 0.
  598. parseQueryX 
  599. --    "<
  600. saveQueryX
  601. _", \
  602. S", "ok", 1, "
  603.     --& Replace 
  604. ("What 
  605. f"First"
  606. f"My 
  607. "field1,field2,field3"
  608. " && 
  609. & "?" \
  610. " & i
  611. """ & 
  612. & """,""" & 
  613. & """,""" & \
  614. & """,""" & 
  615. &":" && 
  616.  & "=" & 
  617. f"OK" 
  618.  "ok", 1, "
  619. getIniFileX
  620. loadQuery
  621. parseQuery
  622. saveQuery
  623. deleteQuery
  624. loadQueryX
  625. saveQueryX
  626. pickAQuery
  627. getIniFile
  628. listQueriesDialog
  629. stripExt
  630. parseQueryX
  631. getIniFileX
  632. loadQuery
  633. pickAQuery
  634. queryChoice is:
  635. svQueryName
  636. svQueryDesc
  637. deleteQuery
  638. Delete
  639. pickAQuery
  640. Delete Query:
  641. Delete Query
  642. okCancel
  643. question
  644. tbMessageBox
  645. Deleting Query:
  646.     pickAQuery
  647. kernel
  648. GetPrivateProfileString
  649. GetProfileList
  650. GetPrivateProfileString
  651. GlobalAlloc
  652. GlobalFree
  653. GlobalLock
  654. globalUnlock
  655. getIniFile
  656. GlobalAlloc
  657. There is not enough memory to perform this function
  658. Query
  659. exclam
  660. tbMessageBox
  661. Failed: Not enough memory
  662. GlobalLock
  663. Queries
  664. GetProfileList
  665. Queries
  666. GetPrivateProfileString
  667. GlobalUnlock
  668. GlobalFree
  669. stripExt
  670. &Queries
  671. Query
  672. Cancel
  673. listQueriesDialog
  674. listboxTitle
  675. queryDesc
  676. tempList
  677. choiceList
  678. queryName
  679. queryList
  680. buffer
  681. bufferSize
  682. fileName
  683. svQueryName
  684. svQueryDesc
  685. action
  686. parseQuery
  687. sqlCommand
  688. default
  689. queryCmnd
  690. fieldValue
  691. fieldName
  692. valueList
  693. fieldList
  694. queryLine
  695. queryPage
  696. buffer
  697. queryName
  698. saveQuery
  699. sqlCommand
  700. Please choose this action from a page that contains an SQL command
  701. Save Query
  702. exclam
  703. tbMessageBox
  704. getIniFile
  705. kernel
  706. GetPrivateProfileString
  707. GetProfileList
  708. GetPrivateProfileString
  709. GlobalAlloc
  710. GlobalFree
  711. GlobalLock
  712. globalUnlock
  713. edit queryName
  714. setValue
  715. edit queryDesc
  716. setValue
  717. dialog
  718. edit queryName
  719. getValue
  720. edit queryDesc
  721. getValue
  722. Query Name 2
  723. Query Description
  724. ,~printMsg
  725. Saving Query "
  726. sqlFieldList
  727. kernel
  728. WritePrivateProfileString
  729.                 3
  730. Queries
  731. WritePrivateProfileString
  732. Error: Couldn't Save This Query
  733. Save Query
  734. exclam
  735. tbMessageBox
  736. ,~printMsg
  737. default
  738. queryLine
  739. valueList
  740. tmpList
  741. fieldList
  742. queryPage
  743. retValue
  744. fileName
  745. queryCmnd
  746. svQueryName
  747. svQueryDesc
  748. stripExt
  749. stringPeriod
  750. stringEnd
  751. stringStart
  752. fileName
  753. getIniFile
  754. fileName
  755. stringPeriod
  756. stringEnd
  757. stringStart
  758. listQueriesDialog
  759. tbkdlg.dll
  760. dialog
  761. setValue
  762. getValue
  763. Cancel
  764. 524480,4,
  765. ,156,
  766. ,8,Helv,,12,8,132,9,6,1342177280,130,,0,LB,12,18,132,
  767. ,7,1352728579,131,ctrlText,0,OK,17,
  768. ,51,13,8,1342242817,128,
  769. ,0,Cancel,88,
  770. ,51,13,9,1342242816,128,
  771. listbox LB,l7,
  772. button OK,b8,TRUE
  773. button Cancel,b9,FALSE
  774. dialog
  775. listbox LB
  776. getValue
  777. tbkdlg.dll
  778. retValue
  779. dlgInit
  780. dlgBox
  781. numLines
  782. buttonCaption2
  783. buttonCaption1
  784. lbTextLines
  785. lbTitle
  786. dbCaption
  787. loadQueryX
  788. ,~printMsg
  789. Loading Query "
  790. kernel
  791. GetProfileList
  792. GetPrivateProfileString
  793. GetPrivateProfileString
  794. GlobalAlloc
  795. GlobalFree
  796. GlobalLock
  797. globalUnlock
  798. getIniFile
  799. GlobalAlloc
  800. There is not enough memory to perform this function
  801. Load Query
  802. exclam
  803. tbMessageBox
  804. Failed: Not enough memory
  805. GlobalLock
  806. Queries
  807. GetProfileList
  808. length
  809. buffer
  810. fileName
  811. queryName
  812. parseQueryX
  813. sqlCommand
  814. ,~printMsg
  815. default
  816. queryCmnd
  817. fieldValue
  818. fieldName
  819. valueList
  820. fieldList
  821. queryPage
  822. queryLine
  823. buffer
  824. queryName
  825. saveQueryX
  826. sqlCommand
  827. Please choose this action from a page that contains an SQL command
  828. Save Query
  829. exclam
  830. tbMessageBox
  831. getIniFile
  832. What is the name of this query?
  833. First
  834. What is the desc of this query?
  835. My First Query
  836. field1,field2,field3
  837. What is the value of field
  838. value
  839. ,~printMsg
  840. Saving Query "
  841. kernel
  842. WritePrivateProfileString
  843.                 c
  844. Cancel
  845. Cancel
  846. Queries
  847. WritePrivateProfileString
  848. Error: Couldn't Save This Query
  849. Save Query
  850. exclam
  851. tbMessageBox
  852. ,~printMsg
  853. default
  854. queryLine
  855. valueList
  856. fieldList
  857. queryDesc
  858. queryPage
  859. queryName
  860. fileName
  861. queryCmnd
  862. getIniFileX
  863. fileName
  864. stringPeriod
  865. stringEnd
  866. stringStart
  867. initMenu
  868. c"&DBC" 
  869. "&Logon" 
  870. logon
  871. ("Where?" 
  872. "loc"
  873.     linkDLL "tbkwin.dll"
  874. screenFromPage(
  875. 9user"
  876. \GetDialogBaseUnits()
  877. , sysMagnification, 
  878. xPixels 
  879. yPixels 
  880. $:" && 
  881. ,& CRLF & "
  882. %:" && 
  883. listboxDialog(
  884. F,"1"&
  885. k&"2","DIALOG")
  886. xDialogBaseUnits 
  887. k65536
  888. yDialogBaseUnits 
  889. y65536
  890. ::" && 
  891. *:" && 
  892. xDialogUnits 
  893. * 4) / 
  894. yDialogUnits 
  895. * 8) / 
  896. 9:" && 
  897. *:" && 
  898. A,"1"&
  899. k&"2","
  900.  x, y, dbTextlines, dbCaption, buttonCaption1, buttonCaption2
  901. dialog(
  902. setValue(
  903. getValue(
  904.     -- Test parameters
  905. "Cancel"
  906.  (no more than 15)
  907. numLines 
  908. j(15, 
  909. (dbTextLines))
  910.     -- Use 
  911. call 
  912. dlgBox 
  913. "524480,3," & x & "," & y & ",146," & 52+
  914. u*8 & \
  915. "524481,3," & x & "," & y & ",146," & 52+
  916. *8 & \
  917. ",,," & 
  918.  & ",8,Helv,LB,12,8,122," & \
  919. *8 & ",7,1352728577,131,ctrlText,0,OK,12," & \
  920. *8 & ",51,13,8,1342242817,128," & \
  921.  & ",0,
  922. ,83," & 22+
  923. *8 & \
  924. ",51,13,9,1342242816,128," & 
  925.  & ",0"
  926. dlgInit 
  927.  LB,l7,
  928. BOK,b8,TRUE
  929. ,b9,FALSE"
  930.     --& 
  931. l7 above, so no need 
  932.  LB",
  933. retValue 
  934. , "nlistbox LB")
  935.     unlinkDLL "tbkdlg.
  936. terBook
  937. initMenu
  938. enterBook
  939. logon
  940. listboxDialog
  941. enterBook
  942. tinitMenu
  943. initMenu
  944. &Logon
  945. logon
  946. Where?
  947. cancel
  948. tbkwin.dll
  949. screenFromPage
  950. GetDialogBaseUnits
  951. screenFromPage
  952. xPixels:
  953. yPixels:
  954. DIALOG
  955. listboxDialog
  956. GetDialogBaseUnits
  957. xDialogBaseUnits:
  958. yDialogBaseUnits:
  959. xDialogUnits:
  960. yDialogUnits:
  961. DIALOG
  962. listboxDialog
  963. yDialogUnits
  964. xDialogUnits
  965. yDialogBaseUnits
  966. xDialogBaseUnits
  967. yPixels
  968. xPixels
  969. listboxDialog
  970. tbkdlg.dll
  971. dialog
  972. setValue
  973. getValue
  974. Cancel
  975. dbTextLines
  976. 524481,3,
  977. ,146,
  978. ,8,Helv,LB,12,8,122,
  979. ,7,1352728577,131,ctrlText,0,OK,12,
  980. ,51,13,8,1342242817,128,
  981. ,0,Cancel,83,
  982. ,51,13,9,1342242816,128,
  983. listbox LB,l7,
  984. button OK,b8,TRUE
  985. button Cancel,b9,FALSE
  986. listbox LB
  987. setValue
  988. dialog
  989. nlistbox LB
  990. getValue
  991. tbkdlg.dll
  992. retValue
  993. dlgInit
  994. dlgBox
  995. numLines
  996. buttonCaption2
  997. buttonCaption1
  998. dbCaption
  999. dbTextlines
  1000. hWnd 
  1001. xlGetWindow()
  1002. "Excel 
  1003. xrunning"
  1004.     translateWindowMessage 
  1005. setSize
  1006. setMinMax
  1007. "setsize"
  1008. setminmax
  1009. dlgPrintDocument xPos, yPos, mode
  1010. 4svCopies, svOrientation, svFileList
  1011.     linkDLL "tbkdlg.dll"
  1012. dialog(
  1013. setValue(
  1014. getValue(
  1015.     --    Initialize 
  1016. R box 
  1017. init values
  1018. "524480,7,30,20,127,98,,,
  1019. ,8,Helv,OK,78.25,15.75,39.20,12.31,19,1342373889,128,OK,0,Cancel,78.25,34.17,39.20,12.31,20,1342242816,128,
  1020. .0,,9.30,17.44,32.34,10.79,10,1342177282,130,&
  1021. 45.71,16.21,20.53,11.28,11,1350631424,129,1,0,,11.09,29.83,56.00,42.95,16,1342177287,128,
  1022. 0,Portrait,16.69,43.24,48.53,10.46,17,1342308361,128,P&
  1023. 10,Landscape,16.69,59.32,48.53,10.46,18,1342177289,128,L&
  1024. BOK,b19,TRUE
  1025. b20,FALSE
  1026. ,s10,&
  1027. iedit 
  1028. i11,1
  1029. ,g16,
  1030. "524480,9,30,20,191,98,,,
  1031. 142.82,15.75,39.50,12.31,19,1342373889,128,OK,0,
  1032. 143.12,34.71,39.20,12.31,20,1342242816,128,
  1033. 0,,10.06,15.75,59.70,8.82,23,1342177280,130,&Documents:,0,Docs,10.06,27.12,60.69,48.25,22,1352728587,131,,0,,76.50,17.97,32.34,10.79,10,1342177282,130,&
  1034. 112.88,16.74,20.53,11.28,11,1350631424,129,1,0,,78.29,30.36,56.00,42.95,16,1342177287,128,
  1035. 83.89,43.77,48.53,10.46,17,1342308361,128,P&
  1036. 83.89,59.86,48.53,10.46,18,1342177289,128,L&
  1037. listbox 
  1038. l22,(None Open)
  1039. copies",
  1040.         --    User chose "
  1041. Bportrait",
  1042. Blandscape",
  1043. tbMessageBox("Error: Dialog Initialization Failed.","
  1044.  "ok",1,"exclam")
  1045. default
  1046.  <> 0
  1047.  <> 0
  1048.     --    bring up 
  1049. retValue 
  1050.         --    
  1051. control)
  1052.     --    orientation (radio buttons)
  1053.     --    sheet setup
  1054. ,1,1,1,1,
  1055. &",1,100)]"
  1056. xlExecute 
  1057. C--&, "silent"
  1058.     --    chart 
  1059. ,1,1,1,1,2,
  1060. &",1,100)]"
  1061. --&, "
  1062. (1,,,"&
  1063. ,1)]"
  1064. --&, "
  1065. setSize
  1066. setminmax
  1067. dlgPrintDocument
  1068. xlGetWindow
  1069. Excel not running
  1070. setSize
  1071. setMinMax
  1072. setSize
  1073. setsize
  1074. setminmax
  1075. setMinMax
  1076. dlgPrintDocument
  1077. tbkdlg.dll
  1078. dialog
  1079. setValue
  1080. getValue
  1081. active
  1082. 524480,7,30,20,127,98,,,Print,8,Helv,OK,78.25,15.75,39.20,12.31,19,1342373889,128,OK,0,Cancel,78.25,34.17,39.20,12.31,20,1342242816,128,Cancel,0,,9.30,17.44,32.34,10.79,10,1342177282,130,&Copies:,0,Copies,45.71,16.21,20.53,11.28,11,1350631424,129,1,0,,11.09,29.83,56.00,42.95,16,1342177287,128,Orientation,0,Portrait,16.69,43.24,48.53,10.46,17,1342308361,128,P&ortrait,0,Landscape,16.69,59.32,48.53,10.46,18,1342177289,128,L&andscape,0
  1083. button OK,b19,TRUE
  1084. button Cancel,b20,FALSE
  1085. ,s10,&Copies:
  1086. iedit Copies,i11,1
  1087. ,g16,Orientation
  1088. button Portrait,b17,TRUE
  1089. button Landscape,b18,FALSE
  1090. 524480,9,30,20,191,98,,,Print,8,Helv,OK,142.82,15.75,39.50,12.31,19,1342373889,128,OK,0,Cancel,143.12,34.71,39.20,12.31,20,1342242816,128,Cancel,0,,10.06,15.75,59.70,8.82,23,1342177280,130,&Documents:,0,Docs,10.06,27.12,60.69,48.25,22,1352728587,131,,0,,76.50,17.97,32.34,10.79,10,1342177282,130,&Copies:,0,Copies,112.88,16.74,20.53,11.28,11,1350631424,129,1,0,,78.29,30.36,56.00,42.95,16,1342177287,128,Orientation,0,Portrait,83.89,43.77,48.53,10.46,17,1342308361,128,P&ortrait,0,Landscape,83.89,59.86,48.53,10.46,18,1342177289,128,L&andscape,0
  1091. button OK,b19,TRUE
  1092. button Cancel,b20,FALSE
  1093. ,s23,&Documents:
  1094. listbox Docs,l22,(None Open)
  1095. ,s10,&Copies:
  1096. iedit Copies,i11,1
  1097. ,g16,Orientation
  1098. button Portrait,b17,TRUE
  1099. button Landscape,b18,FALSE
  1100. iedit copies
  1101. setValue
  1102. button portrait
  1103. setValue
  1104. button landscape
  1105. setValue
  1106. Error: Dialog Initialization Failed.
  1107. Print
  1108. exclam
  1109. tbMessageBox
  1110. dialog
  1111. iedit copies
  1112. getValue
  1113. button portrait
  1114. getValue
  1115. [page.setup("","",1,1,1,1,false,false,true,true,
  1116. ,1,100)]
  1117. xlExecute
  1118. [page.setup("","",1,1,1,1,2,true,true,
  1119. ,1,100)]
  1120. xlExecute
  1121. [print(1,,,
  1122. ,false,false,1,false,1)]
  1123. xlExecute
  1124. retValue
  1125. default
  1126. svCopies
  1127. svOrientation
  1128. svFileList
  1129.