PreLoadFilters method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Access 2.0 example

Access 95, 97 example
Visual J++ example

Syntax short PreLoadFilters (short iFixedFilters, short iCachedFilters, BSTR pszFilters);

Overview:  Refer to Loading Filters

Remarks

Specifies the file format filters to be loaded. Some operating systems (like Windows 95) have a limit for the number of DLLs that can be loaded at a time and that limit can be quickly reached, especially if there are several different controls on the same page/form or if the programming environments themselves load many DLLs. You can use this method to restrict the number of DLLs that LEADTOOLS ActiveX will load. Note that the fewer file import/export DLLs the ActiveX loads, the slower the loading/saving of files will be, since there will be more loading/unloading of DLLs.

pszFilters is in the form xyz, yuv... where XYZ are the 3 letters describing the file filter as in LFxyz14W.DLL or LFxyzU.DLL. For instance, if pszFilter is PCX, TIF, CMP then LFPCXU.DLL will be loaded then LFTIFU.DLL and then LFCMPU.DLL, in that order. The first iFixedFilters will stay in memory at all times, then the next iCachedFilters will be loaded. However, if other filters will be needed, the cached filters might be unloaded to make room for the new DLLs. It is recommended that the most commonly used DLLs be loaded as fixed to minimize the time required to load/unload file filters. Also, some DLLs may require additional DLLs (like the LFAVIU.DLL or LFFPXU.DLL) so the exact number of DLLs loaded is not necessarily iFixedFilters+iCachedFilters. For more information on available DLLs, refer to Files To Be Included With Your Application.

Note that PreLoadFilters has effect only if called before the first time you try to load, save or get information about a file. Calling this method after that will have no effect.

See Also

Elements:  IgnoreFilters method

Topics:  Working with the Control: General Behavior