1. Reduce the loading form, the number of controls, and use the label instead of the text box for each loaded form, regardless of whether the visual or not, accounts for a certain number of memory (its number, the type and number of controls on the form, and the window Variety varies from the size of the body's bitmap.). The form is only loaded only when you need to display, and the form is no longer needed (not a hidden form). Remember, any reference to the property, method, or control of the form, or reference to the form variable that is declared with the New, will cause Visual Basic to load the form. When uninstalling a form using UNLOAD methods, you can only release space occupied by some forms. To release all space, you can use the keyword Nothing to make the form's reference invalid: SET form = Nothing When designing an application, the form should try less control. The actual restriction depends on the type and system of the control, but in fact, a form containing a large number of controls will run slowly. A related technique is: Use the array of controls as much as possible, rather than placing a large number of types of controls on the form. The control array is a set of controls with common names and types. Their event processes are also the same. When designing, the resource consumed by using the control array add control is less resources that consume more than a plurality of controls to the form. The control array is also useful when you want a number of controls to share the code. Label Control Label's Windows resource is less than text box textBox, so it is possible to use the label instead of the text box. For example, when a hidden control is required on the form, use the label more efficient. 2. Use disk files or resources and organizational modules in design, directly put them directly into the application's data (icon character strings and values in the code attributes or code) will increase the memory of the runtime application. Load data from disk files or resources can reduce the occupation memory from disk files or resources. This is particularly valuable for large bitmaps and strings. The resource file is actually consisting of a series of separate strings, bitmaps, or other items, each with a unique identifier. You can create a resource file using a text editor and resource compiler that is provided in Microsoft Visual C . The compiled resource file has a .ex extension. Visual Basic is only loaded into memory only when the module is loaded when the module is loaded. If the process in a particular module has never called, Visual Basic never loads the module. Therefore, try to put the relevant process in the same module, let Visual Basic only load the module when needed. 3. Consider replacing the Variant data type VARIANT data type is extremely flexible, but it is larger than the other data types. When compressing the excess space of the application, you should consider replacing the variant variable in other data types, especially an array of Variant variables. Each Variant takes up 16 bytes, and Integer accounts for 2 bytes, and Double accounts for 8 bytes. Variable length string variable occupies 4 bytes plus each character in a string, but each of each Variant containing a string should take up 16 bytes plus each character in the string 1 One byte. Because they are too large, the Variant variable is especially annoying when used as a local variable or process, because they consume the stack space too fast. However, in some cases, use other data types to replace variant, flexibility, to compensate for the flexibility of losses, have to add more code. The result is that the size is not really reduced. 4. Use a dynamic array and reclaim memory using a dynamic array instead of a fixed array when deleting. When the data of the dynamic array is no longer required, the unwanted data is discarded with ERASE or Redim Preserve and the memory used by the array is reclaimed.