ToolClick cancel

You can setup a before tool activate event.

baseToolbarsManager.BeforeToolActivate += new Infragistics.Win.UltraWinToolbars.CancelableToolEventHandler(baseToolbarsManager_BeforeToolActivate);

private static void baseToolbarsManager_BeforeToolActivate(object sender, Infragistics.Win.UltraWinToolbars.CancelableToolEventArgs args)
{
If(args.Tool.Key == "DeleteTool")
{
args.Cancel = true;
}

}

Jim Kinneman
Encompass Solutions
jimki@...




--- In vantage@yahoogroups.com, "Kevin Simon" <ksimon@...> wrote:
>
> Unfortunately, the args.Cancel() doesn't work. When issuing this command, I
> get the error:
>
> 'Cancel' is not a member of


> 'Infragistics.Win.UltraWinToolbars.ToolClickEventArgs'.
>
>
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> bw2868bond
> Sent: Tuesday, October 12, 2010 8:00 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: ToolClick cancel
>
>
>
>
>
> Just guessing here,
>
> args.Cancel()
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "ksimon8fw" <ksimon@> wrote:
> >
> > I want to disallow certain printing events in the packing slip program. I
> have the code in the toolclick event, but I'm not sure how to cancel the
> event. Here's the code:
> >
> >
> > Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object, ByVal
> args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
> > Select Case (args.Tool.Key)
> > Case "PrintTool", "PrintPackingTool"
> > check for certain events.
> > if certain events occur
> > How do I issue a cancel command here?
> > End If
> > Case Else
> > End Select
> > End Sub
> >
> > Does anyone have the syntax to cancel the toolclick event?
> >
> > Thanks.
> > Kevin Simon
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I want to disallow certain printing events in the packing slip program. I have the code in the toolclick event, but I'm not sure how to cancel the event. Here's the code:


Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object, ByVal args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
Select Case (args.Tool.Key)
Case "PrintTool", "PrintPackingTool"
check for certain events.
if certain events occur
How do I issue a cancel command here?
End If
Case Else
End Select
End Sub

Does anyone have the syntax to cancel the toolclick event?

Thanks.
Kevin Simon
Just guessing here,

args.Cancel()

--- In vantage@yahoogroups.com, "ksimon8fw" <ksimon@...> wrote:
>
> I want to disallow certain printing events in the packing slip program. I have the code in the toolclick event, but I'm not sure how to cancel the event. Here's the code:
>
>
> Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object, ByVal args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
> Select Case (args.Tool.Key)
> Case "PrintTool", "PrintPackingTool"
> check for certain events.
> if certain events occur
> How do I issue a cancel command here?
> End If
> Case Else
> End Select
> End Sub
>
> Does anyone have the syntax to cancel the toolclick event?
>
> Thanks.
> Kevin Simon
>
Unfortunately, the args.Cancel() doesn't work. When issuing this command, I
get the error:

'Cancel' is not a member of
'Infragistics.Win.UltraWinToolbars.ToolClickEventArgs'.





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
bw2868bond
Sent: Tuesday, October 12, 2010 8:00 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: ToolClick cancel





Just guessing here,

args.Cancel()

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"ksimon8fw" <ksimon@...> wrote:
>
> I want to disallow certain printing events in the packing slip program. I
have the code in the toolclick event, but I'm not sure how to cancel the
event. Here's the code:
>
>
> Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object, ByVal
args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
> Select Case (args.Tool.Key)
> Case "PrintTool", "PrintPackingTool"
> check for certain events.
> if certain events occur
> How do I issue a cancel command here?
> End If
> Case Else
> End Select
> End Sub
>
> Does anyone have the syntax to cancel the toolclick event?
>
> Thanks.
> Kevin Simon
>





[Non-text portions of this message have been removed]
Hi Kevin,



From what I know, you cannot do this.

The ToolClick event does nothing per se.

In order to get something to happen when this event is fired, you
assigned an event handler.

In this case, Epicor has created and assigned an event handler that
controls the print function.

You are adding an additional event handler, which should be seen as
completely separate and independent of Epicor's event handler.



You could try to dynamically remove and then add back the Epicor event
handler to temporarily disable the print function but the challenge
there is there is no native way to list all event handlers. You could
try to determine the event handler by reflection but that's tricky too.



If you have a programming contact within Epicor, this would be a great
question for them.

If not, I'll add it to my list of questions to ask at the upcoming
advanced programming class at the end of this month.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Kevin Simon
Sent: Wednesday, October 13, 2010 8:05 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: ToolClick cancel





Unfortunately, the args.Cancel() doesn't work. When issuing this
command, I
get the error:

'Cancel' is not a member of
'Infragistics.Win.UltraWinToolbars.ToolClickEventArgs'.

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of
bw2868bond
Sent: Tuesday, October 12, 2010 8:00 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: ToolClick cancel

Just guessing here,

args.Cancel()

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
"ksimon8fw" <ksimon@...> wrote:
>
> I want to disallow certain printing events in the packing slip
program. I
have the code in the toolclick event, but I'm not sure how to cancel the
event. Here's the code:
>
>
> Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object,
ByVal
args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
> Select Case (args.Tool.Key)
> Case "PrintTool", "PrintPackingTool"
> check for certain events.
> if certain events occur
> How do I issue a cancel command here?
> End If
> Case Else
> End Select
> End Sub
>
> Does anyone have the syntax to cancel the toolclick event?
>
> Thanks.
> Kevin Simon
>

[Non-text portions of this message have been removed]












Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring


This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


[Non-text portions of this message have been removed]