I have a Shown event in my customization. In that Shown event I am trying to do a PerformClick() to click a button on the form. I want the button to click immediately after form is loaded. The problem is that the button click doesn’t happen. If I put a message box in the Shown event in front of the PerformClick() , the message box shows its message and the PerformClick() does the button click as expected. Take the message box out and no PerformClick(). Do any of you guys know what I can do to make this work as I intend? Here is my code. Not much here so you’d think it wouldn’t be that complicated.
Hope you are doing well, it’s been a little while.
I would recommend the load event from the form events wizard in the customization mode. It is possible the form hasn’t loaded fully when you are trying to make this click action.
I would use as well the Load event.
Do you pass a parameter to this form? If so, I would use EpiviewNotification to detect a currentRow present, then launch your button click. As mentioned by Zach, maybe the form is not yet ready for the click in the load event.
EpiDataView doesn’t work for me. It asks for a view when I am defining it. What view do I use? I tried using the view that is defined as the EpiBinding for the button I want to click but all it does is blank out one of my text boxes which I have pre-set in the Load event.