MAXScript Tools and Interaction with 3ds Max > Creating MAXScript Tools > ActiveX Controls in MAXScript Rollouts >

# ActiveX Controls in MAXScript Rollouts

Note

ActiveX Controls have been deprecated by Microsoft in the latest versions of the Windows operating system in favor of the DotNet framework and its controls.

While MAXScript still supports ActiveX controls, these have to be installed and registered on the system to be accessible to MAXScript.

As a replacement of ActiveX controls, MAXScript supports DotNet controls in 3ds Max 9 and higher.

Starting with 3ds Max 4, MAXScript lets the user embed ActiveX Controls in rollouts, thus expanding the number of available User Interface control types.

Examples include:

Simple controls

    ActiveMovieControl Object,Calendar Control,Microsoft TreeView

Compound controls

    Microsoft Excel,Microsoft Internet ExplorerAdobe Acrobat

This provides numerous possibilities in MAXScript which include:

- Embed a web browser into a rollout and then navigate the user to a web site.

- Embed an Excel spreadsheet into a rollout, extract the user entered values from cells and then create animation in Max.

- Create an ActiveMovie player through MAXScript, load an Avi file and then synchronize the animation between the rendered Avi in ActiveMovie player to animation in Max.

The technology behind this feature is a MAXScript extension plug-in (MxsActiveX.dlx) making it MAXScript capable. It does not use ParamBlock2. The plug-in adds a new type of rollout control.

The syntax is:

    activeXControl <name> [ <control_type> ] [	setupEvents:<boolean> ] [	releaseOnClose:<boolean>	] [	prop1:<value> ] [	prop2:<value> ] &ldots;

Parameters:

    <control_type>

A string to create the control.

The string must be formatted in one of the following ways:

- A Program ID such as "MSCAL.Calendar.7"

- A Class ID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"

- A URL such as "http://www.microsoft.com"

- A reference to an Active document such as "file://\\Documents\MyDoc.doc"

- A fragment of HTML such as "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>"

Note

"MSHTML:" must precede the HTML fragment so that it is designated as being a MSHTML stream.

    prop1:<value>

    prop2:<value>

These are control specific keyword arguments. You can get a list of properties and their types by calling showProperties on the control.

    setupEvents:<boolean>

When set to true (default), event support for activeX controls will be enabled. When set to false , none of the event handlers will be called. This is useful when a control fires too many events but you are not interested in any.

    releaseOnClose:<boolean>

Every activeX control creates two hidden controls. Passing true here (default) will free them up and also any resources taken up by the control, and the activex properties cannot be accessed after the rollout has been closed. This is the case for window'ed controls like listview, treeview etc.

If you need to access the properties of the control after you close the rollout, then you need to pass false . This is helpful for windowless control like XML parser, FTP controls etc. See xmlio.ms for an example.

EXAMPLE
    activeXControl ax "{05589FA1-C356-11CE-BF01-00AA0055595A}" \ height:200 width:300 align:#left

## ActiveX Controls Topics:

ActiveX Control Properties

Active X Controls Methods

Active X Inspector Functions

Accessing ActiveX Controls Indexed Properties

ActiveX Controls Cursor Access

ActiveX Array Properties

ActiveX - Disable3ds Maxkeyboard accelerators

ActiveX COM Enums Represented as MAXScript Names

ActiveX by-reference arguments for methods and events

loadPicture for ActiveX Controls

updateWindow for ActiveX Controls

### Typical ActiveX Controls And Examples

ListView ActiveX Control

ListView ActiveX Helper Functions

ListView ActiveX Control Example

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

TreeView ActiveX Control

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

ImageList ActiveX Control

TabStrip ActiveX Control

Windows Media Player ActiveX Control

Windows Media Player ActiveX Control Example

Adobe Acrobat ActiveX Control

Internet Explorer ActiveX Control

Excel Spreadsheet in Internet Browser Control as Extended Viewport

Shockwave Flash ActiveX Object Events

#### See Also

- i-drop - drag and drop

- Visual MAXScript

- MAXScript Dialogs and Rollout Floaters as Extended viewports