If you don't have the DX Studio tab in your toolbox, try running the DXStudioVisualStudio.exe application. This will configure Visual Studio with the DX Studio control automatically. It is located the bin subfolder of your DX Studio install folder. e.g. c:\program files\worldweaver\dx studio\bin\DXStudioVisualStudio.exe
How to manually add DX Studio to your toolbox
| • | Create or open a Visual Studio .Net project. |
| • | In the 'Toolbox' window, go to the 'Components' tab. |
| • | Right click in the Components area and choose 'Add/Remove Items...'. |
| • | In the Customize Toolbox dialog, click the 'COM Components' tab. |

| • | Check the box for 'DX Studio Player' and press OK. |
Using the DX Studio Player component
| • | Go to a new or existing 'Form' in 'Design View' mode, or for C++ projects, open the dialog resource. |
| • | Click on the 'DX Studio Player' button in the toolbox, then click on the form to place the object. In the 'Properties' window for the new object, set the 'src' parameter to the full URL or full filename of the '.dxstudio' file you want to play. For example, if the file 'chart1.dxstudio' is located in 'c:\presentation', you should set 'src' to be 'c:\presentation\chart1.dxstudio'. |
| • | That's it - build and run the project and the form will display the document exactly as defined in the designer. |
Hooking up events in Visual Studio
A powerful feature of the COM control is the ability to send and receive script commands between the document and the container application.
Your application can use the 'Send' command to send script to the control, and override the 'Receive' event to handle commands sent from the document.
A script command sent to a document will need to specify the full path of variables/functions, e.g. scenes.scene_1.script.myFunc().
For example, in C# the Send function passes the following command...
mydocontrol.Send("system.script.myFunction();");
...which is valid if defined in the document script is...
function myFunction()
{
// do something
}
To receive commands from the document, you override the 'Receive' event and process the command string yourself. The command string can be sent from anywhere in the document using the following syntax...
function onClick()
{
shell.send("userclickedmybutton");
}
Note: The receive event is sent from a separate thread used by the engine, and so will not be in the same thread as your application. If this causes a problem, you should use the receive function to post a message to your main thread, telling it to perform any synchronous activity.
For full control of your DX Studio Document, please see the COM Interface documentation.


