IsWindowAvailable

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 IsWindowAvailable( SalString sName )

The IsWindowAvailable method tells whether a window is available (included) in the current application.

Parameters

Name Description
SalString sName Name of window to check.

Returns

The return value is TRUE if the window is available, FALSE otherwise.

Comments

This method is typically used to enable/disable commands that open other windows.

Applications should call the Var.Component.WindowRegister method to register a window as available.

Example

Menu Item: Open &Invoice Window...
   Menu Settings:
       Enabled When: Component.IsWindowAvailable( 'frmCustomerInvocie' )
       Checked When: 
   Menu Actions:
       Call SalCreateWindow( 'frmCustomerInvoice', hWndMDI )
C# code
case Const.METHOD_Inquire:
	mParams.Unpack(sMessage);
	sWindowName = mParams.GetAttribute("__NAME");
	return Var.Component.IsWindowAvailable(sWindowName) 
&& Var.Security.IsDataSourceAvailable(sWindowName);