| MATLAB® | ![]() |
h = actxcontrolselect
[h, info] = actxcontrolselect
h = actxcontrolselect displays a graphical interface that lists all ActiveX controls installed on the system and creates the one that you select from the list. The function returns a handle h for the object. Use the handle to identify this particular control object when calling other MATLAB COM functions.
[h, info] = actxcontrolselect returns the handle h and also the 1-by-3 cell array info containing information about the control. The information returned in the cell array shows the name, programmatic identifier (or ProgID), and filename for the control.

The actxcontrolselect interface has a selection pane at the left of the window and a preview pane at the right. Click on one of the control names in the selection pane to see a preview of the control displayed. (If MATLAB cannot create the control, an error message is displayed in the preview pane.) Select an item from the list and click the Create button at the bottom.
Click the Properties button on the actxcontrolselect window to enter nondefault values for properties when creating the control. You can select which figure window to put the control in (Parent field), where to position it in the window (X and Y fields), and what size to make the control (Width and Height).
You can also register any events you want the control to respond to and what event handling routines to use when any of these events fire. Do this by entering the name of the appropriate event handling routine to the right of the event, or clicking the Browse button to search for the event handler file.

COM functions are available on Microsoft Windows systems only.
Note If you encounter problems creating Microsoft Forms 2.0 controls in MATLAB software or other non-VBA container applications, see Using Microsoft Forms 2.0 Controls in the External Interfaces documentation. |
Open a window showing the ActiveXcontrols on your system:
[h, info] = actxcontrolselect
Select the Calendar Control in the window and click Properties to open the window shown above. Enter new values for the size of the control, setting Width to 500 and Height to 350, then click OK. Click Create in the actxcontrolselect window to create the control.
The control appears in a MATLAB figure window. MATLAB displays information similar to (your version number may be different):
h =
COM.MSCAL_Calendar_7
info =
[1x21 char] 'MSCAL.Calendar.7' [1x44 char]%}
Expand the info cell array to show the control name, ProgID, and filename:
info{:}
MATLAB displays information similar to:
ans = Calendar Control 11.0 ans = MSCAL.Calendar.7 ans = C:\Program Files\MSOffice\OFFICE11\MSCAL.OCX
![]() | actxcontrollist | actxGetRunningServer | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |