Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVENTHANDLER Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01155784
Message ID:
01155833
Views:
24
Hi,
Try:
=EVENTHANDLER(.oleReportControl.Object, .oEventTrap)
HTH,
Viv


>I have created an Active X control in VB6 and am programmatically adding it to a VFP 8 form as shown below. The EVENTHANDLER is throwing an error... 'Function, arguement count or type is invalid'.
>
>
>
>
>	WITH ThisForm
>
>		.AddObject("oleReportControl", "olecontrol", "NSAcctStatus.rptAccountStatus")
>
>		WITH .oleReportControl
>
>			.Top = 0
>			.Left =0
>			.Height = ThisForm.Height
>			.Width  = ThisForm.Width
>
>		ENDWITH
>
>		** Create an instance of the event handler class
>		.oEventTrap = NEWOBJECT("NSControlEvents")
>
>		** Bind the control's event to the event handler class
>		=EVENTHANDLER(.oleReportControl, .oEventTrap)
>
>		.oleReportControl.Visible = .T.
>
>	ENDWITH
>
>RETURN
Previous
Reply
Map
View

Click here to load this message in the networking platform