- Home /
how can i send a command from unity's activex control to my windows form application?
i want to embed unity's activex control to my windows form o WPF application or embed it in a powerpoint slideshow. i can use the activex control's sendmessage method to send commands from the application to my unity content but i want to send commands from unity to my container application. if it was an HTML page i could use javascript but i don't know what should i do now. is there any way to send a message to COM objects or any other way to send a message to my container?
Answer by jashan · Dec 28, 2009 at 08:57 AM
As the Unity ActiveX-control, while "technically supported" is not really documented (or "really supported" ;-) ), my guess would be that the only real option for communication between the container and the Web player would be via a network connection and your own proprietary communications protocol.
maybe it's the only way but i'll wait for other answers. thank you jashan. i typed your name incorrectly in many places sorry
Never $$anonymous$$d. Now go edit and correct all of them. Immediately ;-)
Using 3.1 and PPT 2003, how does one embed the player (let alone talk to it)?
Answer by dendrophile · Dec 28, 2009 at 06:42 PM
I think I'd try calling the Application.ExternalCall script API and use a debugger to see if anything ends up happening on the COM side. My guess is that something will happen (I just don't have a PC in front of me to try.)
the ExternalCall don't do what i want. it's a special function to call js functions
I know it is documented as calling js functions. The html page is normally a container for our activeX control, so I figured that the ExternalCall must cause something to happen outside of the control. I just wondered if your container got any messages from our control to say an external call was being made. (I assume that the html page must intercept the call and pass it on to Javascript.) If you have tried this and it does not work, then that's call, it was just a suggestion. :-)
Answer by DaveA · Dec 03, 2010 at 01:03 AM
Get LiveWeb http://skp.mvps.org/liveweb.htm
To get info out of Unity into Powerpoint: 1. In unity, use Application.ExternalCall (see docs for how) 2. In your html wrapper, implement a function for the above. You might have it set the status bar text or change the page title to the value you passed above. 3. In PPT, View Code on the LiveWeb control, and choose StatusTextChange (or TitleChange) from the dropdown. The value of 'Text' will be that of the status bar (or page title). Note that it will be a LOT of different things from the control itself, but it also picks up the text you set. So look for that.
Your answer
![](https://koobas.hobune.stream/wayback/20220613193021im_/https://answers.unity.com/themes/thub/images/avi.jpg)