Hi everyone,
I am sorry if post this question in the wrong place.
I am using C#, Continuum to intercept user click buttons in Modal Dialog Window by the following code:
In Main:
Application GpApp;
Type t = Type.GetTypeFromProgID("Dynamics.Application", false);
GpApp = (Application)Activator.CreateInstance(t);
GpApp.RegisterFocusTrigger("window 'PM_Transaction_Entry' of form 'PM_Transaction_Entry", focusType, attachType, new ModalDialogHandler(), "action");
In ModalDialogHandler class:
class ModalDialogHandler
{
public void action(int dialog_type, string prompt, string control_1, string control_2, string control_3, int answer)
{
System.Console.WriteLine("Answer: " + answer.ToString());
}
}
I always get error "Specified cast is not valid." when I run this code.
Thank you in advance, I appreciate all you answers.
Tola