Embeds a given window into a backstage page.

Syntax

Send_Message(Ctrl, "OLE.EmbedWindow", Page, Handle)

Parameters

PropertyDescription
PageThe key of a backstage page.
HandleThe window handle of the OI form to embed.

Remarks

The EmbedWindow method merges an OpenInsight form into a backstage page. The backstage is the panel that appears when the user clicks the system button. It contains a series of buttons on the left. Some of the buttons are simple commands that fire the OnCommand event when clicked, but some of the buttons display a page. Think of them like tabs, with your custom content filling up the right portion of the backstage.

The first parameter of this method identifies the page to which the form is to be associated. Pages are defined in the XML passed to the Init method, and each page was given a unique key.

To embed a window, you first need to make sure the window is actively running by calling the Start_Window stored procedure. This means you should make sure your form starts invisibly, otherwise it will briefly appear in front of the ribbon. Next call it's HANDLE property and pass it to the Handle parameter of this method.

You only have to call this method once for each page during the CREATE event of your form. The backstage will take it from there. Note that your OI form will behave normally even though it is embedded within the backstage. The events will be routed to its own commuter module and the controls will behave as expected.

Example

// Start an OI window and embed it into the backstage's INFO page
NewWindow = Start_Window("MY_BACKSTAGE_INFO_WINDOW")
Handle = Get_Property(NewWindow, "HANDLE")
Send_Message(@Window:".OLE_RIBBON", "OLE.EmbedWindow", "INFO", Handle)
  • No labels