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.
SalNumber UserMethod(SalNumber nWhat, SalString sMethod)
The framework calls the UserMethod method on arrival of the Const.PM_UserMethod
message to perform an application defined method. Applications should override
this method to implement the methods.
Name | Description |
---|---|
SalNumber nWhat | Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute, Const.METHOD_GetType |
SalString sMethod | Name of the method to be executed. |
When nWhat = Const.METHOD_Inquire: the return value should be TRUE if the method is
available (possible to execute), FALSE otherwise.
When nWhat = Const.METHOD_Execute:
the return value should be TRUE if the method is completed successfully, FALSE
otherwise.
The nWhat and sMethod parameters correspond to the wParam and lParam parameters for the Const.PM_UserMethod message received by the framework.
public new SalNumber UserMethod(SalNumber nWhat, SalString sMethod) { #region Local Variables #endregion #region Actions using (new SalContext(this)) { if (sMethod == "check credit") { return UM_CheckCredit(nWhat); } else if (sMethod == "update statistics") { return UM_UpdateStatistics(nWhat); } else { return false; } } #endregion }