The Carapace Emulator Window is a tiny executable which holds the emulator ActiveX control. This executable can be run stand-alone from the command line as follows:
caraemu.exe
The executable is also a COM server so that it can be controlled
from your applications using COM. The COM interface gives you full
access over positioning, sizing and displaying the emulator as well
as allowing you to access the internal emulator ActiveX control.
Details of the COM interface offered by caraemu.exe are as
follows:
| program id (progId) | Carapace.EmulatorWindow |
| class id (CLSID) | D3984EC3-A04B-11D5-8468-0050048C7269 |
When starting the executable using COM, the emulator is initially invisible -- this allows you to set the appearance and location of the emulator via COM before making the emulator visible. This prevents the user from seeing the emulator before you have tailored it for your needs.
For example, suppose your application occupies the whole screen with a region set aside for the emulator near the top left corner. The following Carapace script fragment illustrates creation, positioning and customising the appearance of the emulator:
# create the emulator -- it is invisible when created
(set emu (create Dispatch "Carapace.EmulatorWindow"))
# fit it to the desired region on screen
(emu.moveTo 10 10)
(emu.resizeTo 400 240)
# customise the appearance
(emu.removeStyle 18)
(emu.removeStyle 23)
(emu.menubar (quote false))
# make it appear!
(emu.visible (quote true))
Click here for the full COM interface which controls the emulator window.
| Contents | Index | Current topic: communications | Related topics: communications classes, objects |