var formCommand, canvasCommand: command;
begin
formCommand := createCommand('Show canvas', CM_SCREEN, 1);
canvasCommand := createCommand('Show form', CM_SCREEN, 1);
{ add the canvas form onto the canvas (the canvas is displayed by default) }
addCommand(canvasCommand); { switch to form display }
showForm;
{ add the form command to the form display }
addCommand(formCommand);
{ forever switch between the canvas and the form display }
while true do
begin
if getClickedCommand = formCommand then
showCanvas;
if getClickedCommand = canvasCommand then
showForm;
end;
end.