Programmatically Creating and Managing Windows

In VLF-WIN your programs can create and manage windows by calling the method avShowWindow in the Framework manager. For example:


Open a whole new instance of the Framework in another window named MYWINDOW:


#AvFrameworkManager.avShowWindow Caller(#Com_Owner) For(FRAMEWORK) WindowName(MYWINDOW) 


Open the DEMONSTRATION application:


#AvFrameworkManager.avShowWindow Caller(#Com_Owner) For(APPLICATION) ofType(DEMO) WindowName(DEMO_WINDOW) 


Open an application view named HR:


#AvFrameworkManager.avShowWindow Caller(#Com_Owner) For(VIEW) ofType(HR) WindowName(DEMO_VIEW)


Open business objects Organizations and Resources in two independent windows:


#AvFrameworkManager.avShowWindow Caller(#Com_Owner) For(BUSINESSOBJECT) ofType(DEM_ORG) WindowName(DEMO_EMP)


#AvFrameworkManager.avShowWindow Caller(#Com_Owner) For(BUSINESSOBJECT) ofType(DEM_ORG_SEC_EMP) WindowName(DEMO_SECTION)


Remember that the OfType(XXXXXXX) names you specify on calls to avShowWindow are Object User Object / Type values specified on the Identification tab of the properties of the respective object:

Using the avShowWindow method

When the avShowWindow method is invoked, it tests whether a window with the name specified exists.


If the named window already exists, it is activated (i.e. restored from being minimized, if required, and brought to the front of all the Framework windows).


If the named window does not exist, it is created.


Then in both cases:


In simple terms, you are saying to the Framework "Display a window with this name and pass this information into it, then cause it to switch to this application or this business object".


When you create a new window or switch an existing window it happens asynchronously to your program. So if you use avShowWindow and then immediately enumerate all open windows you will not find the window you just created (yet).

Window Names

You may have noticed from the preceding examples that windows have symbolic names. Here are some things you should know about window names:



Finding a Window

Enumerating All Windows

The Current and Main Windows

Window Opening Information