FrameStartupUser

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean FrameStartupUser(  )

Applications override the FrameStartupUser method to perform actions when a window has been started. But unlike in Centura, since window forms are cached and reused , all logic that should be executed each time you navigate to an application form should be moved from FrameStartupUser to vrtActivate.

Returns

Applications should return false to skip standard window startup logic (such as executing the "startup behavior" settings), or true to allow standard logic.

In vrtActivate method remove all Return true, Return 0 or Return 1 statements, method should only return  base.Activate(URL).

Comments

The FrameStartupUser is called by the framework after a window has been complete created and is visible on the screen, but before the framework executes any startup behavior according to the properties for that window.

Note: If this method is overridden on a form or table window some code must be supplied in order to support the standard framework functionality DataTransfer. InitFromTransferedData() is obsolete in IFS Enterprise Explorer and InitFromTransferredData() is used to replace it.

Functionality depending on static data should not be in vrtActivate. Example of static data is IID client or db values that are fetched from database.

Example

public new SalBoolean FrameStartupUser()
{
#region Actions
  using (new SalContext(this))
  {
	if (Ifs.Fnd.ApplicationForms.Var.DataTransfer.RecCountGet() > 0) 
	{
		Sal.WaitCursor(true);
		InitFromTransferedData();
		Ifs.Fnd.ApplicationForms.Var.DataTransfer.Reset();
		cmbPerson.RecordSelectionListSetSelect(0);
		Sal.WaitCursor(false);
		return false;
	}
	else
	{	
Sal.WaitCursor(false); return true; } } #endregion }
public SalBoolean FrameStartupUser()
{
	#region Actions
	// Data Transfer is normaly transported on the URL but for dialog 
//boxes the instance items is still used // Framestartup user is run before Activate so if this is a dialog
//this code will find the transfer information and act on it. // For an ApplicationForms feature the DataTransfer object will not
//yet be initialized so this logic is skipped if (Var.DataTransfer.RecCountGet() > 0) { Sal.WaitCursor(true); if (InitFromTransferredData()) { Var.DataTransfer.Reset(); } Sal.WaitCursor(false); return false; } // Turn of possible hanging wait cursor Sal.WaitCursor(false); // Return TRUE to indicate continued startup processing return true; #endregion }