04-17-2012 02:22 AM
I need manually manage any commands (eg from menu or toolbars). Eg. block any command.
best regards
bernardo
04-17-2012 04:54 AM
To monitor an ACT menu you can register your own command on top of ACT's.
But that does not block it, only lets you know it was raised.
ACTAPP.RegisterCommand("act-ui://com.act/application/menu/schedule/call", AddressOf MyMnuCall_Click, Act.UI.RegisterType.Shell)
Public Sub mnuCall_Click(ByVal CommandID As String) ' your code here End Sub
The code above only raises the commandID it does not pass any event arguments.
I would be very nice if ACT raised the object and a Cancel Event Arg like so..
Public Sub MnuCall_Click(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) ' your code here
' Let ACT know you handled the menu event e.Cancel = true
End Sub
For some ACT menus I need to completely monitor and suppress, I remove the native menu and replace it with my own.
If somebody knows a different way I would love to here about it!
Thanks
-- Jim Durkin