External Interfaces/API Reference |
Delete a COM control or server
Syntax
Arguments
h
Handle for a COM object previously returned from actxcontrol
, actxserver
, get
, or invoke
.
Description
Release all interfaces derived from the specified COM server or control, and then delete the server or control itself. This is different from releasing an interface, which releases and invalidates only that interface.
Examples
Create a Microsoft Calender application. Then create a TitleFont
interface and use it to change the appearance of the font of the calendar's title:
f = figure('pos',[300 300 500 500]); cal = actxcontrol('mscal.calendar', [0 0 500 500], f); TFont = get(cal, 'TitleFont') TFont = Interface.mscal.calendar.TitleFont set(TFont, 'Name', 'Viva BoldExtraExtended'); set(TFont, 'Bold', 0);
When you're finished working with the title font, release the TitleFont
interface:
Now create a GridFont
interface and use it to modify the size of the calendar's date numerals:
When you're done, delete the cal
object and the figure window. Deleting the cal
object also releases all interfaces to the object (e.g., GFont
):
Note that, although the object and interfaces themselves have been destroyed, the variables assigned to them still reside in the MATLAB workspace until you remove them with clear
.
whos Name Size Bytes Class GFont 1x1 0 handle TFone 1x1 0 handle cal 1x1 0 handle Grand total is 3 elements using 0 bytes
See Also
release
, save
, load
, actxcontrol
, actxserver
addproperty (COM) | deleteproperty (COM) |