TcxCustomShellListView.OnExecuteItem Event
In This Article
Occurs before the default associated program is launched for the file shell item activated by pressing the Enter key or by double-clicking the mouse.
#Declaration
Delphi
property OnExecuteItem: TcxShellExecuteItemEvent read; write;
#Remarks
The APIDL
parameter identifies the shell item being activated by pressing the Enter key or by double-clicking the mouse. To convert the APIDL
parameter value to a readable string, use the GetPIDLName function.
Set the AHandled
parameter to True
, to prevent launching the default associated program for the activated file shell item.
The following code example demonstrates how to prohibit launching the default associated program for .BMP files.
Delphi
procedure TForm1.cxShellListView1ExecuteItem(Sender: TObject;
APIDL: PItemIDList; var AHandled: Boolean);
begin
AHandled := Pos('.bmp', GetPIDLDisplayName(APIDL, True)) = Length(GetPIDLDisplayName(APIDL, True)) - 3;
end;
Note
The On
event is fired only when the AutoTrue
.
See Also