I try to use the white to do the windows automation, the following codes do click the button and show a new form:
app = Application.Attach("xxxx");
window = app.GetWindow("xxxx");
When after the above codes, it should show a new form. But I get the exceptions message box:
Title: Error Initializing Form
Details: The following error has occured: Object reference not set to an instance of an object.
In addition, it is ok in my computer when run the above codes but errors in many other computers, and it is also ok when click it in other computers manually.
So I'm not sure what happened, please advice if you have any suggestions, thanks.