PRB: Adding VB Custom Method Control Causes Fault in VFP5
ID: Q168826
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a
SYMPTOMS
Adding a custom control that has been created in Visual Basic 5.0 using a
custom method can cause a fault in Visual FoxPro 5.0 and 5.0a.
If the operating system is Windows 95, the message is "Illegal Operation -
Invalid Page Fault." If the operating system is Windows NT, the error is an
Application Error, Visual FoxPro referenced memory location 0x00000000,
which could not be read.
RESOLUTION
Add SYS(2333,0) in the INIT event of the form, save and run the form at
least once before adding the custom control to the form. Using the
SYS(2333,0) disables the ActiveX dual interface (VTABLE binding) support.
STATUS
This behavior is by design.
MORE INFORMATIONSteps to Reproduce Behavior
Create the control in Visual Basic 5.0 with the following steps:
- Run Visual Basic 5.0, and select "Create new ActiveX control."
- Add a TextBox control to the form.
- Click Add-Ins on the menu. If the ActiveX Control Interface Wizard does
not already show up as one of the options, select Add-Ins Manager.
- When the Add-Ins manager shows up, click the ActiveX Control
Interface Wizard.
- Click the Add-Ins menu again, and select the ActiveX Control Interface
Wizard.
- Click Next until you reach the Select Interface Members screen,
then remove all props/events/methods from the Selected name list box.
- Click Next to go to the Create Custom Interface Member' screen,
then click New.
- In the Add custom Member dialog box, type MYTEST under the Name
text box, select Method for the type, and then click OK.
- Click Next twice, and then click Finish.
- From the File menu, select Make <project name> to compile the
OCX.
In Visual FoxPro 5.0, do the Following:
- Start Visual FoxPro.
- Create a new form.
- Add an OLE Container control to the form.
- Select your new Visual Basic created control from the list (if you do
not name the project or the control in Visual Basic, the name in the
box will be Project1.UserControl1).
NOTE: A system error occurs, caused by Visual FoxPro 5. This error does
not occur with Visual FoxPro 3.x.
Additional query words:
Keywords : kberrmsg kbVFp FxinteropOcx
Version : 5.0 5.0a
Platform : WINDOWS
Issue type : kbprb
|