StartupObject: IUnknownAgg;
StartupObject: Prognoz.Platform.Interop.ForeSystem.IUnknownAgg;
The StartupObject property returns description of the object that is started directly from object.
IUnknownAgg is an abstract interface and can be cast to IMetabaseObjectDescriptor.
Executing the example requires that the form contains the Button component with the Button1 identifier, and this form and its shortcut must be in the repository.
Add links to the Forms and Metabase system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
MBD: IMetabaseObjectDescriptor;
Begin
//Get form data
MBD := Self.StartupObject As IMetabaseObjectDescriptor;
//Display message in the console
Debug.Write(MBD.IsShortcut.ToString);
End Sub Button1OnClick;
After executing the example clicking the button displays in the console whether a form was started using a shortcut.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Forms;
Imports Prognoz.Platform.Interop.Metabase;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MBD: IMetabaseObjectDescriptor;
Form: IFormControl;
Begin
//Get form data
MBD := Form.StartupObject As IMetabaseObjectDescriptor;
//Display message in the console
System.Diagnostics.Debug.Write(MBD.IsShortcut.ToString());
End Sub;
See also: