Tricks to minimoze window size (OpenInsight 32-bit Specific)
At 21 JUN 2003 02:17:41PM Jim Eagan wrote:
Large window is nearing 64K. I've tweeked and put it on a diet every way I can think of. Splitting it into small sections is not a good solution for the application (but maybe a last resort). Does anyone have any magic tricks for reducing the size?
At 21 JUN 2003 07:37PM Donald Bakke wrote:
Jim,
This is not an exhaustive list, but some ideas we've used in the past:
1. Abbreviate the names of all your controls. Remember menu names can also be abbreciated.
2. Replace multiple static text controls that appear in the same vertical column with one multi-line static control. This assumes that you can live with the spacing and you can live without the accelerator keys.
3. Similar to above, but use a BMP image instead. This will give you more control over the spacing and the look but you will still have to live without the accelerator keys.
4. Remove your static text controls altogether and create them on-the-fly during the CREATE event of your window. You can do this with other controls as well but it gets more complicated when you are using controls that are databound, have events, validations, etc. Keep in mind, however, that this approach might violate the runtime license agreement since runtime applications are not permitted to create controls. Personally I think this situation ought to be an exception to the rule but without express permission I would assume that you can only take this approach with a developer's license.
5. If you have several controls that work together, like a street address, city, state, zip, etc., then you can replace them with an intelligent editbox. You, of course, would have to provide the intelligence. Outlook's address book does this. If you want, you can still allow your end users to click on a button or menu option that brings up a dialog box that separates the data into individual controls.
dbakke@srpcs.com