The
ReadyState property has the following enumeration:
- READYSTATE_UNINITIALIZED = 0
- READYSTATE_LOADING = 1
- READYSTATE_LOADED = 2
- READYSTATE_INTERACTIVE = 3
- READYSTATE_COMPLETE = 4
Steps to reproduce the problem in InfoPath 2003
Build a control that is named
ReadyStateControl. To do this, follow these steps:
- Start Microsoft Visual Studio. NET 2003.
- On the File menu, click New, and then click Project to create a new project.
- In the New Project dialog box, click Visual C++ Projects, click ATL Project, and then type ReadyStateControl in the Name box.
- Click OK, and then click Finish to accept all default settings for the ATL project.
- On the Project menu, click Add Class.
- In the Add Class dialog box, double-click ATL Control.
- In the ATL Control Wizard dialog box, type ReadyState in the Short name box.
- Click Stock Properties, click Ready State in the Not supported list, and then click > to add the Ready State property to the Support list.
- Click Finish.
- In the Readystate.h file, locate the following line.
public CComControl<CReadyState>
Put the following line under the previous line. public IObjectSafetyImpl<CReadyState, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER>
Note You have to add a comma (,) to the existing line before you add the new line. - On Build menu, click Build Solution to build the project.
Test the
ReadyStateControl control. To do this, follow these steps:
- Start InfoPath.
- On the File menu, click Design a Form.
- In the Design a Form pane, click New Blank Form.
- Click Controls, and then click Add or Remove Custom Controls.
- In the Add or Remove Custom Controls dialog box, click Add.
- In the Add Custom Control Wizard, click CReadyState Object, and then click Next.
- Click Next to continue to accept the default options. Click Finish, and then click OK.
- Under Custom, click CReadState Object in the Controls pane.
This adds the CReadState Object control to the form. - Under Standard, click TextBox to add a TextBox control to the form.
- Click Preview Form.
InfoPath 2003 Service Pack 1 does not respond. You cannot access the TextBox control.