How do I add an OLEContainer to a Web project?

Hi all,

New to Xojo web but fairly experienced on the desktop side.

I have an ActiveX control that controls all my smart lights. I’d like to make a web interface for my lights in Xojo Web, compile it to an .EXE and run it on one of my Windows PC’s at home. But I can’t seem to get the project to accept the OLEContainer control. I have a xojo desktop app working perfectly with all the code already written, I just need to translate it to web.

Any tips would be appreciated.

I am not sure if that is possible with XOJO as XOJO web application is a specialized console application. For ActiveX control you would need a GUI based application.
You can:

  1. Create a XOJO windows desktop application with the ActiveX control and link it to a XOJO web application for relaying the command over the web.

OR

  1. Embed a webserver class into your XOJO windows desktop application and relay the command internally.

Either way, i dont think it is possible to expose the ActiveX Control to your user directly over XOJO web application.

Thanks for the reply, that’s unfortunate but I think you’re right if web compiles to a console app.

Rather than take the time to develop my own communications protocol between the two apps AND learn xojo web, I could probably knock this out in asp.net in an hour or two.

Appreciate the reply.

I suggest copying your Desktop libraries to a Xojo Console application as a test. Add your Methods to the App area, and see if those work. If it runs/compiles for Console, it will run for Web.

The OLEContainer does not work in a console app, so no, it looks like it’s not going to work in a web app either. I suppose from Xojo’s perspective it doesn’t make sense to support a platform-specific component in a cross-platform target. There are probably some hacky workarounds I could do by shelling to VBScript and hosting the COM object that way, but rather than do all that work, like I mentioned earlier, Asp.Net does support active-x controls on the server side so that’s probably a better tool for this project.

I do want to get into Xojo Web projects and was hoping this would be the project to cut my teeth on it, but that will have to be another day.

Thanks for the replies everyone. :slight_smile: