ShellBrowserOnBeforeInvokeCommand Method |
Namespace: Jam.ShellAssembly: ShellBrowser (in ShellBrowser.dll) Version: 7.2
Syntaxpublic override void OnBeforeInvokeCommand(
BeforeShellCommandEventArgs e
)
Public Overrides Sub OnBeforeInvokeCommand (
e As BeforeShellCommandEventArgs
)
public:
virtual void OnBeforeInvokeCommand(
BeforeShellCommandEventArgs^ e
) override
abstract OnBeforeInvokeCommand :
e : BeforeShellCommandEventArgs -> unit
override OnBeforeInvokeCommand :
e : BeforeShellCommandEventArgs -> unit Parameters
- e BeforeShellCommandEventArgs
- Event information to send to registered event handlers.
Implements
IShellCommandInvokableOnBeforeInvokeCommand(BeforeShellCommandEventArgs)
Example
Shows the usage of the
BeforeShellCommand event.
using (ShellBrowser shellBrowser = new ShellBrowser(lFilePath))
{
shellBrowser.BeforeShellCommand += (s, e) =>
{
if (e.Verb == ShellCommand.Open)
e.Cancel = true;
if (e.Verb == ShellContextMenuCommand.Open)
e.Cancel = true;
if (ShellCommand.IsOpen(e.Verb))
e.Cancel = true;
if (ShellCommand.IsEmpty(e.Verb))
System.Diagnostics.Debug.WriteLine(e.Verb.Caption);
};
shellBrowser.ShowContextMenu(Cursor.Position);
}
See Also