ist, Hi!
Your idea is good, but i think you can't simulate button click by this method. You can try to place breakpoint in task() method in your form like this:
X++:
public int task(int _taskId)
{
int ret;
;
ret = super(_taskId);
breakpoint;
return ret;
}
In this example when i clicked by mouse on buttons form (left clicked), i can't step in this method in debugger. But if i'll use keyboard, system should step in with _taskId parameter.