home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / ARQS_ZIP / VBQUIRK.ZIP / VBQUIRK.TXT
Encoding:
Text File  |  1991-06-07  |  7.5 KB  |  166 lines

  1. New items added 06/07/91 through the date of this file
  2. Part 1
  3.    Memory (corrected) 
  4. Part 2
  5. -------------------------------------------------------------------------
  6.  
  7. This file contains information about bugs, quirks, and general points
  8. of interest to programmers working with Visual Basic. It is divided
  9. into four parts:
  10.  
  11.   Part 1 - Description of bugs, quirks, etc.
  12.            Note that the version column contains 1.00 for all entries,
  13.        but will be useful in the future.
  14.   Part 2 - General points of interest
  15.   Part 3 - Sample programs
  16.  
  17. If you want to find one of the above quickly, use your text editor to
  18. search for the text shown above. i.e., Search for "Part 1 -".
  19.  
  20. All new or changed entries will be marked with the date
  21. that the information was added or changed. The date will appear in the
  22. entry in the format (yy/mm/dd).
  23.  
  24. This file is maintained by Mark Novisoff of MicroHelp, Inc. MicroHelp
  25. publishes add-on products for Visual Basic, including VBTools, the
  26. MicroHelp Communications Library and MicroHelp Muscle (Muscle will be released 
  27. during the summer of 1991). MicroHelp also publishes a number of add-on
  28. products for Microsoft QuickBASIC and PDS 7.x.
  29.  
  30. If you have additional information that should be added, please send it
  31. to:
  32.      Mark Novisoff
  33.      MicroHelp, Inc.
  34.      4636 Huntridge Drive
  35.      Roswell GA 30075-2012
  36.      Compuserve ID 73047,3706 in MSSYS (Microsoft Systems Forum)
  37.      
  38. If possible, please include a *small* sample program that will demonstrate
  39. the problem and cause it to happen whenever the program is run.     
  40.  
  41. -------------------------------------------------------------------------
  42. Part 1 - Description of bugs, quirks, etc.
  43. -------------------------------------------------------------------------
  44. Topic          Version         Description
  45. -------------- --------------- --------------------------------------------
  46. Beep           1.00            See KeyPress.
  47. Hide           1.00            If you simply Hide a form when you're done
  48.                                with it, the form consumes system "resources".
  49.                    Because resources are limited, you may be
  50.                    better off to Unload the form until it's
  51.                    needed again.
  52. KeyPress       1.00            If the user presses <Enter> while a Text Box
  53.                                has the focus, and you don't have a Command
  54.                    Button with the Default property set to TRUE,
  55.                    Windows will cause a BEEP to occur. To avoid
  56.                    the BEEP, change the KeyAscii parameter to
  57.                    zero when it is passed to you as 13.
  58. List Box       1.00            When a List Box has the focus, the up and
  59.                                down arrow keys will generate a CtlName_Click 
  60.                    event. 
  61. ListIndex      1.00            Setting the ListIndex property of a List Box
  62.                                causes a CtlName_Click event.
  63. Memory         1.00            Each Form and each module gets its own 64K
  64.                    segment to hold scalar variables
  65.                    (i.e., variables that are not in arrays).
  66.                    Each array is stored in its own segment,
  67.                    with each array having a limit of just
  68.                    under 64K.
  69.                    All properties on a form, except for the
  70.                    .Text properties in List Box controls (which
  71.                    get a separate segment assigned to each one), 
  72.                    go into a single 64K segment.
  73.                    (Corrected 91/06/07)
  74. Now            1.00            Now is a double-precision variable. If you
  75.                                save it in a single-precision variable,
  76.                    you may lose accuracy.
  77. Picture        1.00            To delete a bitmap from a Picture property,
  78.                                select the Picture property via the properties
  79.                    bar, set the focus to the (bitmap) display
  80.                    in the Combo Box, and press the Del key.
  81. Text           1.00            When you are adding text to a Text Box
  82.                                control, and you have many items to add
  83.                    (such as lines from a text file), it is
  84.                    more efficient to first concatenate all
  85.                    the strings and then place them in the
  86.                    control in a single operation. This also
  87.                    eliminates the flickering that would
  88.                    otherwise occur when adding many items.
  89. Text Box       1.00            See KeyPress.
  90. Unload         1.00            See Hide.
  91. Unload         1.00            If a form is unloaded, accessing any 
  92.                                property on the form causes the form
  93.                    to be reloaded. This can result in an
  94.                    "Out of memory" error.
  95.                    
  96. ----------------------------------------------------------------------------
  97. Part 2 - General points of interest
  98. ----------------------------------------------------------------------------
  99. EXE File sizes
  100.  
  101. Every comment in a VB program takes 2 bytes of space in an .EXE file.
  102. Every blank line in a VB program also takes 2 bytes of space in an .EXE.
  103.  
  104. If you load a project, then edit-make exe-edit-make exe, etc., your EXE
  105. file size may increase each time. If you do this for a long period of
  106. time, your EXE will be substantially larger than if you simply loaded the
  107. project and immediately built the EXE.
  108.  
  109. To create the smallest possible EXE file:
  110.  
  111.    Load the project
  112.    For I = 1 To All FormsAndModules
  113.        Code-Save Text
  114.        Code-Load Text (replacing existing code)
  115.    Next
  116.    Make the EXE
  117. ----------------------------------------------------------------------------
  118. Handling Keystrokes
  119.  
  120. Every key on the keyboard generates a KeyCode. Special cases to note are:
  121.  
  122.   KeyUp/KeyDown/KeyPress events will be invoked for <Enter> only if no 
  123.     Default command button exists on the form.
  124.   
  125.   KeyUp/KeyDown/KeyPress events will be invoked for <Esc> only if no 
  126.     Escape command button exists on the form.
  127.  
  128.   KeyUp/KeyDown/KeyPress events will not be invoked for <Tab>.
  129.  
  130.   Use KeyDown to trap all non-ascii keys (i.e. the function keys, arrow
  131.   keys, etc), or when the user wishes to differentiate the number-pad keys
  132.   from the numeric-row keys.
  133.  
  134.   Use KeyDown and KeyUp in combination when your program needs to know how 
  135.   long a key was depressed.
  136. ----------------------------------------------------------------------------
  137. System Resources
  138.  
  139. There are a few things you can do to free up system resources:
  140.  
  141.   Run in Standard mode instead of 386Enhanced mode:
  142.       This eliminates the overhead of windows virtual memory management.
  143.       While it is faster, you'll have only the physical RAM available to 
  144.       you.  However, if you have at least 8meg of RAM, you will probably
  145.       not notice a difference in the number of apps you can run simultaneously
  146.       because the resource limit is the same in both modes.
  147.  
  148.       Unless you run some memory intense program or run DOS apps in the 
  149.       background, there really isn't any reason to run in 386Enh mode.
  150.  
  151.   Minimize the number of Program groups and icons within your Program manager:
  152.       Every group and every Icon uses up system resouces. Keep only the 
  153.       programs you use all of the time in a program group.
  154.  
  155.   Use MSDOS.EXE as your Shell instead of PROGMAN.EXE:
  156.       This is a bit extreme, but MSDOS.EXE uses much less memory and
  157.       resources than PROGMAN.EXE, and it is much faster. 
  158.   
  159. ----------------------------------------------------------------------------
  160. Part 3 - Sample programs
  161. ----------------------------------------------------------------------------
  162.  
  163. <No programs are present at this time>
  164.  
  165. <End of file>
  166.