home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 April B / Pcwk4b98.iso / Borland / Dbase50w / SAMPLES1.PAK / SAMPLES.TXT < prev    next >
Text File  |  1994-08-02  |  12KB  |  322 lines

  1.              Copyright (c) 1991-1994 Borland International, Inc.
  2.                             All Rights Reserved.
  3.  
  4. This document describes the sample program files, which are installed
  5. in the SAMPLES subdirectory.
  6.  
  7. Several programs use the dBASE for Windows Form syntax, which lets
  8. you run multiple programs simultaneously. For example, start openform.prg
  9. by either typing DO OPENFORM in the Command window or double-clicking on
  10. its icon in the Navigator.  After the openform form appears, you can
  11. start Winapi.wfm again either through the Command window or Navigator.
  12. You can then switch freely between the two forms.
  13.  
  14. All samples should be run from the <_dbwinhome>\samples directory.
  15.  
  16. There is a SAMPLES.CAT catalog that lists all the samples files described
  17. below.
  18.  
  19. Note:  The files in the samples\extern, and samples\music
  20.        directories are described in extern.txt, and music.txt,
  21.        which are located in the corresponding diretories.
  22.  
  23. ANIMALS.WFM
  24. -----------
  25.  
  26. Files used: ANIMALS.DBF, ANIMALS.DBT, ANIMALS.QBE, ANIMALS.MDX
  27.             BUTTONS.CC
  28.  
  29. This program shows how the dBASE for Windows form controls defined on
  30. database fields are related and change as the record pointer changes.  It
  31. also displays imaging commands.  The image displayed is stored in
  32. a binary field in ANIMALS.DBF.  An animal's size will turn red when that
  33. animal has a size of > 10.
  34.  
  35. You can type "Do animals.wfm" in the Command window to run this file,
  36. and then click the Design SpeedBar button to design it. Alternatively,
  37. in the Navigator, you can select the Forms icon, and
  38. right-click the icon for ANIMALS.WFM to SpeedMenu where you can choose
  39. an option.  You can then select Design Form to design the form.
  40. When you want to run the form, click the Run (lightning bolt) SpeedBar
  41. button.
  42.  
  43.  
  44. BINTREE.PRG
  45. -----------
  46.  
  47. File used:  CLIENTS.DBF
  48.  
  49. This program shows how you can use the dBASE object extensions to create
  50. a binary tree.  It builds a tree of client names, from CLIENTS.DBF, in
  51. alphabetical order.  The tree goes left to right alphabetically, for
  52. example, left child, parent, right child.
  53.  
  54.  
  55. BUTTONS.CC
  56. ----------
  57.  
  58. This is a procedure file containing custom control classes for dBASE
  59. forms.  You can use the controls in this file by issuing a SET PROCEDURE
  60. TO within your program, and then using the custom controls as you would
  61. any built-in ones as in: DEFINE CANCELBUTTON C OF THIS....
  62. If you have this procedure file loaded before opening the Form Designer,
  63. the custom controls defined in it will appear in the Control Palette
  64. under Custom.  You can then add these controls to your form visually and
  65. modify their properties in the Object Inspector and the Procedure Editor.
  66.  
  67.  
  68. CAL.WFM
  69. -------
  70.  
  71. This is a simple calculator form.  It allows mathematical calculations,
  72. memory manipulations, and hex/decimal conversions.  The results appear in
  73. the display entry field at the top of the form.  The memory value appears
  74. in the memory entry field at the bottom of the form.
  75.  
  76. You can modify and inspect this form through the Form Designer.
  77.  
  78.  
  79. CHANGDIR.PRG
  80. ------------
  81.  
  82. File used:  BUTTONS.CC
  83.  
  84. CHANGDIR.PRG is a tool for changing directories.  It allows you to
  85. traverse a directory tree, select a directory and either change
  86. directories to the one you seleted (by pressing the OK button), or cancel
  87. the program (by pressing the Cancel button).
  88.  
  89.  
  90. CONTACT.WFM
  91. -----------
  92.  
  93. Files used: COMPANY.DBF, CONTACT.DBF, CONTACT.DBT, CONTACT.MDX, CONTACT.QBE,
  94.             COMPANY.DBT, COMPANY.MDX
  95.             BUTTONS.CC
  96.  
  97. This program relates 2 tables and shows how form controls
  98. work together and change as the record pointer moves in the main table.
  99. It defines a form with a list box containing the names of companies,
  100. radio buttons with company types, an entry field showing the contact for
  101. the current company (from the contact table),and an editor showing notes
  102. for that contact (also from the contact table).
  103.  
  104. The Close push button closes the form.
  105.  
  106. CONTACT.WFM can be modified through the Form Designer.
  107.  
  108.  
  109. CUSTOMER.WFM
  110. ------------
  111.  
  112. Files used:  CUSTOMER.DBF, CUSTOMER.DBT, CUSTOMER.MDX, CUSTOMER.QBE,
  113.              ORDERS.DBF, ORDERS.QBE,
  114.              CUSTOMER.MNU, DIVESHOP.BMP,
  115.              BUTTONS.CC
  116.  
  117. This is a form that shows information about different customers in a
  118. company. It also illustrates how you can use transactions in a dBASE form.
  119. You can move through the existing customers by selecting the Next/Previous
  120. buttons, Cancel to leave the form, or edit the information about the current
  121. customer.
  122.  
  123. You can look at the form in two modes -- View or Edit.  Initially
  124. the form is in View mode, which doesn't allow editing of information.
  125. To change to Edit mode, choose Customer|Edit from the menu. Changing
  126. information in Edit mode, and moving to another customer will display
  127. a dialog box, which asks if you want to save the information you just
  128. changed. You will not see this dialog box when moving between records
  129. in View mode.
  130.  
  131. This form contains a menu that allows adding or deleting a customer and
  132. searching for a customer based on the NAME index tag.
  133.  
  134.  
  135. DBCLOCK.PRG
  136. -----------
  137.  
  138. Files used:  DBTIMER.VBX, DBCLOCK.BFM
  139.  
  140. This is a simple clock program.  It brings up a form with a time display.
  141. The time display changes size as you resize the form.  It will always be
  142. centered in the form.  There is also a menu that allows changing the font
  143. and color properties of the time display, as well as the format of the
  144. displayed time (12/24 hour).
  145.  
  146.  
  147. EQUIPMNT.WFM
  148. ------------
  149.  
  150. Files used:  EQUIPMNT.WFM, GETFLTS.WFM, CHANGEQ.WFM,
  151.              EQUIPMNT.QBE, CHANGEQ.QBE,
  152.              FLIGHTS.DBF, FLIGHTS.MDX, AIRCRDB.DBF, AIRCRDB.DBT,
  153.              AIRCRDB.MDX,
  154.              EQUIPMNT.MNU
  155.              EQUIPMNT.H,
  156.              AIRBRLND.BMP, AIRBRLN2.BMP
  157.  
  158. Note:        There is also an EQUIPMNT.CAT catalog that lists the
  159.              above files.
  160.  
  161. This is an application that lets you change airplanes for different flights
  162. of the Airborland airlines.
  163.  
  164. It brings up a form with a menu that lets you select the flight for which
  165. you want to change the equipment.  After you select the flight, you will
  166. see a browse of all flights corresponding to your selection, an image of
  167. the plane used for the flight currently highlighted in the browse, and a
  168. button you can press to actually change the plane.
  169.  
  170. Pressing the Change Equipmnt button displays another form with a
  171. list box of different plane names and the image corresponding to the
  172. selected plane type.  You can select an airplane from here, and the
  173. current flight will be modified to use the new plane.
  174.  
  175. To exit the program, choose File|Exit.
  176.  
  177.  
  178. EVENT.PRG
  179. ---------
  180.  
  181. This is a program that shows how you can use the different event handlers
  182. attached to a form to detect combinations of mouse and keyboard
  183. key presses.  It displays two forms.  One of them you can resize by
  184. dragging the mouse -- the form will follow (without you having to
  185. drag the border).  The other one lets you create as many buttons
  186. as you want, move them around and align them by combining different key
  187. click combinations.
  188.  
  189.  
  190. FONT.WFM
  191. --------
  192.  
  193. Shows how to set different fonts and colors for the form
  194. controls. Fonts can be set for all the form controls.
  195.  
  196.  
  197.  
  198. LINKLIST.PRG
  199. ------------
  200.  
  201. This is a simple program that creates a linked list of integers from 1 to
  202. 10. Each link has a value and next properties.  After the list is created,
  203. a function is called to step through it and display the contents of each
  204. link.
  205.  
  206.  
  207. NAMEINFO.WFM
  208. ------------
  209.  
  210. Files used:  NAMES.DBF, NAMES.DBT, NAMES.QBE,
  211.              NAMESRCH.WFM
  212.              BUTTONS.CC
  213.  
  214. This program shows dBASE for Windows' DDE capabilities.  It establishes
  215. a link with WordPerfect to create a "Thank you" letter for customers
  216. that had purchased software.
  217.  
  218.  
  219.  
  220. OPENFORM.PRG
  221. ------------
  222.  
  223. Files used:  COUNTRY.DBF, COUNTRY.DBT, COUNTRY.MDX,
  224.              BUTTONS.CC
  225.  
  226. This program shows how the OPEN FORM command works. OPEN FORM displays a
  227. form and enables the controls contained on that form. It  does not stop
  228. program control flow.
  229.  
  230. In this program, you can select a country in one form, then view
  231. information about that country in a second form.  You can then select
  232. more countries from the first form, and display forms with information
  233. about them. All information forms remain onscreen until you close them.
  234.  
  235.  
  236. ORDERS.WFM
  237. ----------
  238.  
  239. Files used:  ORDERS.QBE, ORDERS.DBF, ORDERS.MDX,
  240.              LINEITEM.DBF, LINEITEM.MDX
  241.              CUSTOMER.DBF, CUSTOMER.DBT, CUSTOMER.MDX,
  242.              ORDERS.MNU,
  243.              DIVESHOP.BMP,
  244.              BUTTONS.CC
  245.  
  246. This form displays information about a customer order. It uses a format
  247. similar to Customer.wfm.  It has buttons that let you move around in the
  248. Orders table.  The Orders table is related to the Customer and Lineitems
  249. tables.  Each order could have many line items ordered.  These items are
  250. displayed in a browse control on the form that changes as you move
  251. through the orders.  There is also a customer number displayed for
  252. each order.
  253.  
  254. There is also a menu attached to this form through which you can add or
  255. delete an order, or search for an order based on the current index,
  256. order_no
  257.  
  258.  
  259. SEARCH.WFM
  260. ----------
  261.  
  262. Files used:  BUTTONS.CC
  263.  
  264. This is a generic search form that allows you to enter a value, and then
  265. save it by pressing Ok, or ignore it by pressing Cancel.  The value is
  266. saved as a property of the form, so that the form calling Search.wfm can
  267. search and perform some action based on the value.
  268.  
  269.  
  270. SWITCH.WFM
  271. ----------
  272.  
  273. Files used:  SWITCH.VBX, SWITCH.BFM
  274.  
  275. This form illustrates how to use VBX controls in dBASE forms.
  276. It displays a simple two-state switch that changes the color of the form
  277. and the caption of the switch control when it's turned on or off.
  278.  
  279.  
  280. PICTURES.WFM
  281. ------------
  282.  
  283. Files used:  PICTURES.DBF, PICTURES.DBT, PICTURES.MDX, PICTURES.QBE
  284.  
  285. Note:        All ole field values contain embedded data.  Windows
  286.              saves the full path with each linked file, so only
  287.              embedded data can be used if the files are to be portable.
  288.  
  289. This program shows how the form controls defined on table
  290. fields are related and change as the record pointer changes.  It also
  291. shows how you can view OLE fields in dBASE forms.
  292.  
  293. A form is defined with a list box of image names and an OLE control
  294. containing an image you can modify through Paintbrush. The OLE control
  295. corresponds to the currently highlighted name.  There is also a sound
  296. button that will play a sound corresponding to the image.  Both the OLE
  297. image and the sound are stored in binary fields in Pictures.dbf.
  298. Double-clicking on the OLE control allows you to edit it through
  299. Paintbrush.
  300.  
  301. You can use the Form Designer to modify and run this form file.
  302.  
  303.  
  304. WINAPI.WFM
  305. ----------
  306.  
  307. Files used: SYSINFO.WFM, BUTTONS.CC
  308.  
  309. Calls:  GetVersion(),GetWinFlags(),GetModuleUsage(),GetModuleHandle(),
  310.         ShowWindow(),GetFreeSpace(),messagebox(),SystemParametersInfo(),
  311.         GetWindowText(),CloseWindow(),OpenIcon(),GetWindowsDirectory(),
  312.         GetPrivateProfileString()
  313.         (external functions)
  314.  
  315. This program gives extensive examples of how you can use the API
  316. interface to access Windows functions and obtain useful information.
  317. It displays a form that lets you select what external functions or groups
  318. of functions you would like to execute, and then executes your selection.
  319. You can get various types of system information, display Windows dialog
  320. boxes, minimize or maximize dBASE windows, and much more.
  321.  
  322.