OnOpenFile Event (LEADDlgFile Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

L_INT OnOpenFile (int nFilePercent, int nTotalPercent);

Delphi Syntax

Function OnOpenFile (nFilePercent: L_INT; nTotalPercent: L_INT): L_INT;

Overview

Refer to Using Imaging Common Dialogs.

Remarks

OnOpenFile event is triggered for each file selected by the user to be opened using the Open dialog box when the user wants to open multiple files at the same time.

This event will be triggered only if DLG_OPEN_ALLOWMULTI is set in the DlgFileFlags property.

If you set DLG_OPEN_LOADBITMAP in the DlgFlags property, the Bitmap property will be valid during this event only when the nFilePercent= 100.

If you set DLG_OPEN_GENERATETHUMBNAIL in DlgFlags property, the Thumbnail property will be valid during this event only when the nFilePercent= 100.

The FileName property will be changed in this event according to the file currently loading.

Do not assign 0 to LEADDlgFile.Bitmap or LEADDlgFile.Thumbnails during this event.

See Also

Elements:

ShowOpenDlg method, Bitmap property, Thumbnail property, FileName property.

Topics:

Imaging Common Dialogs: Properties, Methods, and Events