home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / bkgrnd.zip / DOSBKGND.TXT < prev    next >
Text File  |  1994-08-07  |  4KB  |  73 lines

  1. Requirements
  2. ------------
  3. DOSBKGND.PAS and VIDEO.PAS require nothing more than Borland Pascal 
  4. version 6.0 or later and Turbo Vision.
  5.  
  6. The routines in the Video unit are self-explanatory and can be used 
  7. seperate of DOSBKGND.PAS.
  8.  
  9. DOSBKGND.PAS requires VIDEO.PAS. See SAMPLE.PAS for an example of how 
  10. to use DOSBKGND.PAS.
  11.  
  12. Cost and copyright information
  13. ------------------------------
  14. Both DOSBKGND.PAS and VIDEO.PAS are freeware and uncopyrighted. Anyone 
  15. is free to distribute both units and modify them as they wish. The 
  16. only requirements are that they be distributed together, as 
  17. DOSBKGND.PAS requires VIDEO.PAS.
  18.  
  19. Possible problems
  20. -----------------
  21. This was written using Borland Pascal 7.0. I would assume that it 
  22. would work correctly with Turbo Pascal 6.0 with two exceptions. On 
  23. lines 61 and 65 in VIDEO.PAS, I make reference to two constants 
  24. defined in Borland's System unit - SegB000 and SegB800. I am not sure 
  25. if these were defined in Turbo Pascal 6.0. If not, simply replace them 
  26. with $B000 and $B800 respectively.
  27.  
  28. In line 79 of VIDEO.PAS, I refer to the CRT variable WindMax. This 
  29. variable contains the lower right coordinates of the current text 
  30. window. I assumed that the current text window would be the entire 
  31. screen. If a window has been defined using CRT's Window routine prior 
  32. to calling the routine SaveDOSScreen, not enough memory will be 
  33. allocated to hold the entire contents of video memory. You will 
  34. probably not notice this until you call UpdateDOSScreen and find only 
  35. a portion is restored and the rest is garbage. This can be prevented 
  36. by calling SaveDOSScreen first thing in your program, or at least 
  37. before you define any text windows on screen.
  38.  
  39. Reason for DOSBkGnd and Video
  40. -----------------------------
  41. I was writing a short utility that used command-line parameters to 
  42. control its options. This utility only displayed about two lines of 
  43. information at the DOS prompt and did not clear or modify the DOS 
  44. screen other than writing its two lines of information. I decided to 
  45. make it easier to set this utility's options by allowing a dialog box 
  46. to be popped up while it was running. I wanted to do this without 
  47. clearing, hiding, or otherwise changing the DOS screen. In other 
  48. words, I wanted this dialog box to pop up over the DOS screen - in TSR 
  49. fashion - and leave the DOS screen still visible, and when it was 
  50. closed leave the DOS screen unchanged and start up where I left off. 
  51. If you are familiar with Turbo Vision, its TDesktop and TBackground 
  52. objects don't allow for this. Also, DoneVideo - called when 
  53. TurboVision shuts down - clears the screen.
  54. So I decided to make a new TBackground and a new TDesktop that used 
  55. the new TBackground. TDOSBackground's only change from TBackground was 
  56. that instead of using a repeating character as a background, it uses 
  57. the DOS screen itself. This was done by directly accessing video 
  58. memory to make a copy of it, then using this copy to draw the screen 
  59. with Turbo Visions WriteBuf command.  This copy is also used to 
  60. restore the DOS screen after Turbo Vision clears the screen when it is 
  61. finished.
  62.  
  63. Comments and complaints
  64. -----------------------
  65. Questions, comments or complaints are welcome and appreciated. I can 
  66. be contacted via Compuserve as Tim J. Duncan [72603,3616]. Either E-
  67. mail me directly or post a message in the Borland Pascal forum (GO 
  68. BPASCAL) addressed to me. Please be aware that if you post any 
  69. messages in the Borland Pascal forum addressed to me, I will only be 
  70. able to download these once a week. Due to financial constraints 
  71. (Compuserve can get awfully expensive awfully fast), I only log-on to 
  72. Compuserve on Sunday afternoons.
  73.