Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ActiveX Events in PRG vs SCX?
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
ActiveX Events in PRG vs SCX?
Miscellaneous
Thread ID:
00491099
Message ID:
00491099
Views:
45
I created a dummy form, dropped a PowerTCP web server control on top of it, and put this code into the GET Event:
*** ActiveX Control Event ***
LPARAMETERS session, request, response
ThisForm.Label1.Caption = request.filename
And when the event fires, the caption updates. I guess this means that the parameter "request" is an object itself, right?

But wait, there's more I don't understand. :)
If I do the following in a .prg, I get an OLE error "OLE Error 0x80020006: Unknown Name" on the line that is oW.Get()
oW = CreateObject("Dart.Webserver.1")
oW.RootDirectory = "c:\"
oW.LogDirectory = "c:\"
oW.Start(8080 , -1 , "127.0.0.1" , "127.0.0.1"  )
tStartTime = DateTime()
Do While .T.
  oW.Get()
  DoEvents
If DateTime() > (tStartTime + 15)
Cancel
EndIf
EndDo
oW.Stop
oW = .Null.
I guess there is more than one way to reference a control's event, but I'm not understanding. I also tried to adapt Erik's Moore's "ActiveX Decorator Discovery" code, creating my own GET() that could be called but I get the error "request is not an object".

Anyone?
Next
Reply
Map
View

Click here to load this message in the networking platform