Skip to main content

SalWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.49 (4.9.0.0)

Delegate class for Sal windows functionality. Since we cannot inherit from .NET controls and from our class we need to implement all common functionality here and then delegate calls using method wrappers.

public class SalWindow

Constructors

Instance memberSalWindow(salWnd)

Creates a new instance of SalWindow and saves the control that is bound to this instance.

NameTypeDescription
salWndISalWindow

Properties

Static memberDesignMode

Boolean: Returns/Sets the DesignMode flag.

Static memberDisableMessages

Boolean: Enables/Disables the dispatching of Windows messages to the SAL MessageActions handler. This is used to suppress message dispatching when there is a potential recursive loop that will cause a stack overflow. For example, when setting the cursor .NET causes the WM_SETCURSOR message to be sent which might cause stack overflow if the function was originally called in response to WM_SETCURSOR.

Static memberDragLocation

Point: Returns the location of the mouse, in client's coordinates, when the drag-drop mode was initiated.

Static memberDragSource

Control: Returns the source control for the drag-drop operations.

Static memberDropDisabled

Boolean: Enables/Disables drag-drop operations.

Static memberDropLocation

Point: Returns the location of the mouse (in client's coordinates), when the mouse was released the drag-drop operation terminated.

Static memberDropTarget

Control: Returns the drop target control.

Static memberKeepMask

Boolean: Enables/Disables keeping the mask when reading the text from a masked edit control.

Static memberMapEnterToTab

Boolean: Enables/Disables the mapping of the enter key to the tab key.

Instance memberNamedProperties

SalNamedProperties: Returns the collection of named properties.

Static memberProfessionalColors

ProfessionalColorTable: Returns the shared instance of the ProfessionalColors table. This is used by components that want to use colors similar to WinForms tool strip controls. Currently we use it for SalFormToolBar, XSalToolbar, XSalSeparator, XSalToolbox.

Methods

Static memberAddListItem(ctrl, text)

Adds a string to the list control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textStringText to add to the list.

Returns: Int32. The index of the added item or Sys.LB_Err (-1) if there is an error.

Instance memberAddMessageActions(handler)

Deprecated memberDeprecated: Deprecated. Use AddWindowActions() Adds the specified handler to the list of delegates registered to received the MessageActions event.

ParameterTypeDescription
handlerDelegate

Instance memberAddMessageActions(target)

Deprecated memberDeprecated: Deprecated. Use AddWindowActions(). Adds the handlers from the target window to the list of delegates registered to received the MessageActions event.

ParameterTypeDescription
targetISalWindow

Instance memberAddWindowActions(handler)

Adds the specified handler to the list of delegates registered to handle the WindowActions event.

ParameterTypeDescription
handlerDelegate

Instance memberAddWindowActions(target)

Adds the handlers from the target window to the list of delegates registered to received the WindowActions event.

ParameterTypeDescription
targetISalWindow

Static memberBringToTop(ctrl)

Brings a window to the top of all overlapping windows.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberCanCopy()

Returns true of the selection in the control with the focus can be copied.

Returns: Boolean.

Static memberCanCut()

Returns true of the selection in the control with the focus can be cut.

Returns: Boolean.

Static memberCanPaste()

Returns true if there is the control with the focus can paste the text in the clipboard.

Returns: Boolean.

Static memberCanUndo()

Returns true if the control with the focus can undo the last edit operation.

Returns: Boolean.

Static memberCenter(ctrl)

Centers a window relative to the parent, or the owner, or the screen.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberClear()

Deletes the selection in the control with the focus.

Returns: Boolean.

Static memberClear(ctrl)

Clears the value from a data field, multi line field, or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberClearCursor(ctrl, type)

Clears a window's cursor.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeInt32

Returns: Boolean.

Static memberClearList(ctrl)

Deletes all entries from the list control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberCopy()

Copies the selection from the control with the focus to the clipboard.

Returns: Boolean.

Static memberCopyProfile(ctrl, profile)

Clones the specified profile into the custom profile associated to the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
profileInt32

Returns: Boolean.

Static memberCopyString(text)

Copies the text to the clipboard.

ParameterTypeDescription
textString

Static memberCreateFont(name, size, enhancement)

Creates a Font object from the specified parameters.

ParameterTypeDescription
nameString
sizeSingle
enhancementInt32

Returns: Font.

Static memberCreateWindow(type, owner, args)

Creates modeless dialog boxes, MDI windows, form windows, and top-level table windows at runtime.

ParameterTypeDescription
typeType
ownerControl
argsObject[]

Returns: Control.

Static memberCreateWindow(typeName, parent, args)

Creates modeless dialog boxes, MDI windows, form windows, and top-level table windows at runtime.

ParameterTypeDescription
typeNameString
parentControl
argsObject[]

Returns: Control.

Static memberCreateWindow(type, parent, left, top, width, height, flags, args)

Creates a form window, dialog box, or table window as a child of another form window, dialog box, or toolbar at runtime.

ParameterTypeDescription
typeType
parentControl
leftSingle
topSingle
widthSingle
heightSingle
flagsInt32
argsObject[]

Returns: Control.

Static memberCreateWindow(typeName, parent, left, top, width, height, flags)

Creates a form window, dialog box, or table window as a child of another form window, dialog box, or toolbar at runtime.

ParameterTypeDescription
typeNameString
parentControl
leftSingle
topSingle
widthSingle
heightSingle
flagsInt32

Returns: Control.

Static memberCut()

Deletes the selected from the control with the focus and places it in the clipboard.

Returns: Boolean.

Static memberDeleteListItem(ctrl, index)

Deletes a list box or combo box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Index of the item to remove from the list.

Returns: Int32.

Static memberDestroy(ctrl)

Destroys a form window, a top-level table window, or a modeless dialog box created with SalCreateWindow.

ParameterTypeDescription
ctrlControl

Returns: Boolean.

Static memberDisableWindow(ctrl)

Disables keyboard and mouse input to a window. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberDisableWindowAndLabel(ctrl)

Disables keyboard and mouse input to a window and grays out its associated label.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberDragAcceptFiles(ctrl, accept)

Indicates whether a window can accept a file from Windows' File Manager.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
acceptBoolean

Returns: Boolean.

Instance memberDragDropStart()

Initiates drag-drop mode.

Returns: Boolean.

Instance memberDragDropStart(pt, data)

Initiates drag-drop mode.

ParameterTypeDescription
ptPoint
dataObject

Returns: Boolean.

Instance memberDragDropStop()

Aborts drag mode.

Returns: Boolean.

Static memberEnableWindow(ctrl)

Enables keyboard and mouse input to a window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberEnableWindowAndLabel(ctrl)

Enables keyboard and mouse input to a window and enables its associated label as well. A label is the label control that immediately precedes the window in the tab order.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberEndDialog(ctrl, value)

Destroys a modal dialog box and returns control to the caller of SalModalDialog.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
valueInt32

Returns: Boolean.

Static memberFillDoubleGradient(g, start, middle, end, bounds, firstGradientSize, secondGradientSize, vertical)

Draws a double gradient background.

ParameterTypeDescription
gGraphics
startColor
middleColor
endColor
boundsRectangle
firstGradientSizeInt32
secondGradientSizeInt32
verticalBooleanIf the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Static memberFillGradient(g, start, end, bounds, vertical)

Draws a gradient background.

ParameterTypeDescription
gGraphics
startColor
endColor
boundsRectangle
verticalBooleanIf the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Static memberFindChild(ctrl, name)

Finds a child window of a given name in the specified window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nameString

Returns: Control.

Static memberFindChild(ctrl, type)

Finds a child window of a given type in the specified window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeType

Returns: Control.

Static memberFindControl(ctrl, name, throwIfNotFound)

Finds a member control in the specified control. Used as a helper functions to resolve unqualified references.

ParameterTypeDescription
ctrlControlThe control that owns the member to find.
nameStringName of the member control to find.
throwIfNotFoundBooleanWhen true, throws a MissingMemberException if the member is not found. The default is true.

Returns: Control.

Static memberFindMember(ctrl, name, throwIfNotFound)

Find a member in the specified control. Used as a helper functions to resolve unqualified references.

ParameterTypeDescription
ctrlControlThe control that owns the member to find.
nameStringThe name of the member to find.
throwIfNotFoundBooleanWhen true, throws a MissingMemberException if the member is not found. The default is true.

Returns: ReferenceInfo.

Static memberFireWindowActions(ctrl, msgCode, wParam, lParam)

Dispatches a Sal messages directly to the control's WindowActions handlers.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgCodeInt32
wParamSalNumber
lParamSalNumber

Returns: WindowActionsEventArgs.

Static memberFireWindowActionsToChildren(ctrl, msg, wParam, lParam)

Dispatches the specified message (Window Actions) directly to the children's WindowActions event handlers, without going through Windows message loop.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgInt32
wParamSalNumber
lParamSalNumber

Returns: Boolean.

Static memberFormUnitsToPixels(ctrl, units, vertical)

Computes the number of pixels in the number form units.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
unitsSingle
verticalBooleanIf the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Returns: Int32.

Static memberFromHandle(handle, type)

Retrieves the control associated with the handle and casts it to the target type. If the target type is a second-base class in multiple inheritance tree, uses reflection to cast the control to the second-base instance.

ParameterTypeDescription
handleSalWindowHandle
typeType

Returns: Object.

Static memberGetClassName(ctrl)

Return the name of a window's class as a string.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetClientArea(ctrl)

Returns the SalClientArea panel.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalFormClientArea.

Static memberGetControlName(ctrl)

Gets the name of a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetControlName(ctrl, sName)

ParameterTypeDescription
ctrlControl
sNameSalString&

Returns: Boolean.

Static memberGetControlType(ctrl)

Returns the type of control (TYPE_*).

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32.

Static memberGetDataLength(ctrl)

Returns the maximum length of a data field, multi line text field, or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32.

Static memberGetDataType(ctrl)

Returns a data field's or table window column's data type (DT_*).

ParameterTypeDescription
ctrlControl

Returns: Int32. DT_*

Static memberGetDefaultButton(ctrl)

Returns the default push button on a form window or dialog box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Control.

Static memberGetFirstChild(parent, typeMask)

Returns the first child window of the specified type.

ParameterTypeDescription
parentControl
typeMaskInt32One or more window types combined (using the OR (|) operator) to create a mask of child window types.

Returns: Control.

Static memberGetFocus()

Returns the handle of the control with the focus.

Returns: SalWindowHandle.

Static memberGetFont(ctrl, sName, nSize, nEnhancement)

ParameterTypeDescription
ctrlControl
sNameSalString&
nSizeSalNumber&
nEnhancementSalNumber&

Returns: Boolean.

Static memberGetFont(font, name, size, enhancement)

ParameterTypeDescription
fontFont
nameString&
sizeSingle&
enhancementInt32&

Returns: Boolean.

Static memberGetFontNames()

Gets the names of the screen or printer fonts.

Returns: String[].

Static memberGetFormat(ctrl)

Gets the format of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetFormatCode(ctrl)

Returns the current format of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32.

Static memberGetFormattedText(ctrl, format)

Returns the contents of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
formatBoolean

Returns: String.

Static memberGetFormParameter(ctrl, paramType, value)

ParameterTypeDescription
ctrlControl
paramTypeSalNumber
valueSalNumber&

Returns: SalBoolean.

Static memberGetInputMask(ctrl)

Gets the input mask of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetLabel(ctrl)

Finds the Label assigned the specified control. Labels are assigned at startup using the TabIndex preceding the control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Control.

Static memberGetLabelText(ctrl)

Retrieves the label text of a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetLabelText(ctrl, maxLen)

Returns the text of the label associated to the specified control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
maxLenInt32

Returns: String.

Static memberGetLabelText(ctrl, sText, maxLen)

ParameterTypeDescription
ctrlControl
sTextSalString&
maxLenInt32

Returns: SalNumber.

Static memberGetListItemsCount(ctrl)

Returns the number of list box or combo box entries.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32. Number of items in the list.

Static memberGetListItemState(ctrl, index)

Determines whether the specified list box or combo box entry is selected.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Index of the item to check the state for.

Returns: Boolean. True if the item at the index position is selected, otherwise false.

Static memberGetListItemText(ctrl, index)

Returns an entry in the list box or combo box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Index of the item to retrieve the text from.

Returns: String. Text of the specified item.

Static memberGetListItemText(ctrl, index, text)

ParameterTypeDescription
ctrlControl
indexInt32
textSalString&

Returns: Int32.

Static memberGetListItemTextLength(ctrl, index)

Returns the length of a list box or combo box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Index of the item to return the length for.

Returns: Int32. Length of the text of the specified item.

Static memberGetListSelectedFile(ctrl, fileName)

ParameterTypeDescription
ctrlControl
fileNameSalString&

Returns: Boolean.

Static memberGetListSelectedFile(ctrl)

Fetches the selected directory or file name from a list box or combo box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String. Name of the selected file in t he control.

Static memberGetListSelectedIndex(ctrl)

Returns the index of the selected entry in a combo box or single-selection list box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32. Index of the first selected item.

Static memberGetListSelectedItems(ctrl, selectedArray)

Fills the target array with the indexes of the selected entries in the list box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
selectedArraySalArray<SalNumber>Array to receive the list of selected indices.

Returns: Boolean. Number of selected items, which is the number of elements in selectedArray .

Static memberGetListSelectedItemsCount(ctrl)

Returns the number of selected entries in a multiple-selection list box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32. Number of selected items in the list.

Static memberGetLocation(ctrl)

Returns a window's current position on the X and Y axes.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: PointF.

Static memberGetMdiClient(ctrl)

Returns the MDI client area of the MDI container.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: MdiClient.

Static memberGetMessageName(msg)

ParameterTypeDescription
msgInt32

Returns: String.

Static memberGetMousePositionFromLParam(lParam)

Converts Windows' LParam value to the corresponding signed X,Y mouse coordinates.

ParameterTypeDescription
lParamIntPtr

Returns: Point.

Static memberGetNextChild(ctrl, typeMask)

Returns the next child control in the tab order that matches a specified type.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeMaskInt32One or more window types combined (using the OR (|) operator) to create a mask of child window types.

Returns: Control.

Static memberGetParent(ctrl)

Returns the handle of an object's parent window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Control.

Static memberGetProfile(ctrl)

Returns the code of the custom profile associated with the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32.

Static memberGetProfileParameter(ctrl, paramCode, paramValue)

ParameterTypeDescription
ctrlControl
paramCodeInt32
paramValueSalNumber&

Returns: Boolean.

Static memberGetProfileParameter(ctrl, paramCode, paramValue)

ParameterTypeDescription
ctrlControl
paramCodeInt32
paramValueSalString&

Returns: Boolean.

Static memberGetProperty(ctrl, name)

Gets the value of a named property for a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nameString

Returns: String.

Static memberGetProperty(ctrl, name, sValue)

ParameterTypeDescription
ctrlControl
nameString
sValueSalString&

Returns: Boolean.

Static memberGetSalMessageName(msg)

Returns the name of a SAM message.

ParameterTypeDescription
msgInt32

Returns: String.

Static memberGetScrollBarPosition(ctrl)

Returns the current scroll bar value.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32.

Static memberGetScrollBarRange(ctrl, nMin, nMax, nLine, nPage)

ParameterTypeDescription
ctrlControl
nMinSalNumber&
nMaxSalNumber&
nLineSalNumber&
nPageSalNumber&

Returns: Boolean.

Static memberGetSize(ctrl)

Returns a window's size.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SizeF.

Static memberGetSortedControls(parent)

Returns the collection of controls sorted by the TabIndex.

ParameterTypeDescription
parentControl

Returns: Control[].

Static memberGetState(ctrl)

Returns a window's current state.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Int32.

Static memberGetStatusBar(ctrl)

Returns the SalStatusBar control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalFormStatusBar.

Static memberGetStatusBarText(ctrl)

Gets the text displayed in the status bar of a top-level or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetSysColor(colorValue)

Gets a system color.

ParameterTypeDescription
colorValueInt32

Returns: Int32. Color

Static memberGetText(ctrl)

Retrieves the text of a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: String.

Static memberGetText(ctrl, text, maxLen)

ParameterTypeDescription
ctrlControl
textSalString&
maxLenInt32

Returns: Int32.

Static memberGetText(ctrl, maxLen)

Returns the string value of the specified control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
maxLenInt32

Returns: SalString.

Static memberGetTextUnmasked(ctrl)

Returns the unmasked content of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalString.

Static memberGetToolBar(ctrl)

Returns the SalToolbar control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalFormToolBar.

Static memberGetWindowColor(ctrl, colorIndex)

Gets a window's color.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
colorIndexInt32

Returns: Int32.

Static memberHasAccessories(ctrl)

Returns true if the form has the accessories panels.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberHideWindow(ctrl)

Hides a control. Returns false if the control is already hidden.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean. True if the control was previously visible.

Static memberHideWindowAndLabel(ctrl)

Hides a control and its associated label.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberInsertListItem(ctrl, index, text)

Inserts an entry into a list box or combo box at a specified position.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Position in the list where to insert the text .
textStringText of the item to insert in the list.

Returns: Int32. The index of the added item or Sys.LB_Err (-1) if there is an error.

Static memberInvalidate(ctrl)

Causes a window to be repainted.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsChecked(ctrl)

Determines whether a radio button is set or a check box is checked.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsDerivedFrom(ctrl, type)

Returns true if a control is an instance of the class.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeType

Returns: Boolean.

Static memberIsEmpty(ctrl)

Verifies whether a data field, multi line text field, or table window column is null or empty.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsEnabled(ctrl)

Determines whether a window is enabled for mouse and keyboard input.

ParameterTypeDescription
ctrlControl

Returns: Boolean.

Static memberIsKeyboardMessage(msg)

Returns true if the message code is a mouse or a keyboard message.

ParameterTypeDescription
msgInt32

Returns: Boolean.

Static memberIsModified(ctrl)

Returns the setting of the modified flag for a data field, multi line field, combo box, table window's context row cell.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsMouseMessage(msg)

Returns true if the message code is a mouse or a keyboard message.

ParameterTypeDescription
msgInt32

Returns: Boolean.

Static memberIsSalMessage(msg)

Returns true if the message is a known SAM message.

ParameterTypeDescription
msgInt32

Returns: Boolean.

Static memberIsScrollBarVisible(control, bars)

Returns true if the requested scrollbar is visible on the control.

ParameterTypeDescription
controlControl
barsScrollBars

Returns: Boolean.

Static memberIsValid(ctrl)

Validates the contents of a data field or table window column using the current profile.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsValidDateTime(ctrl)

Verifies whether a data field, multi line text field, or table window column contains a valid date/time value.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsValidDecimal(ctrl, precision, scale)

Verifies whether a data field, multi line text field, or table window column contains a valid decimal value.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
precisionInt32
scaleInt32

Returns: Boolean.

Static memberIsValidEditMask(mask)

Validates the input mask of a data field or table window column.

ParameterTypeDescription
maskString

Returns: Boolean.

Static memberIsValidFormat(format, code)

Validates a numeric or date/time picture format.

ParameterTypeDescription
formatString
codeInt32

Returns: Boolean.

Static memberIsValidInteger(ctrl)

Verifies whether a data field, multi line text field, or table window column contains a valid integer value.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsValidNumber(ctrl)

Verifies whether a data field, multi line text field, or table window column contains a valid numeric value..

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberIsVisible(ctrl)

Determines whether a window is currently visible.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberKillTimer(ctrl, id)

Destroys an control's system timer.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
idInt32

Returns: Boolean.

Static memberListGetMultiSelect(ctrl)

Returns an array of index numbers of selected list box entries.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: IList. List of selected indices.

Static memberMDIArrangeIcons(ctrl)

Arranges minimized child window icons in an MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberMDICascade(ctrl)

Cascades all non-iconized child windows of an MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberMDITile(ctrl, vertical)

Tiles all non-iconized child windows of an MDI window. Windows that are not sizable will not be tiled.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
verticalBooleanIf the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Returns: Boolean.

Static memberMessageBeep(alert)

Plays a waveform sound that corresponds to a given system alert level.

ParameterTypeDescription
alertInt32

Returns: Boolean.

Static memberMessageBox(owner, text, title, flags)

Displays a message box and returns a number that indicates the user's response.

ParameterTypeDescription
ownerControl
textString
titleString
flagsInt32

Returns: Int32.

Static memberModalDialog(type, owner, args)

Creates a modal dialog box. See also: EndDialog

ParameterTypeDescription
typeType
ownerControl
argsObject[]

Returns: Int32.

Static memberModalDialog(typeName, owner, args)

Creates a modal dialog box. See also: EndDialog

ParameterTypeDescription
typeNameString
ownerControl
argsObject[]

Returns: Int32.

Static memberMove(ctrl, offset)

Moves a window a given number of form units on the X and Y axes relative to its current position.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
offsetPointF

Returns: Boolean.

Static memberPaste()

Pastes the text in the clipboard to the control with the focus.

Returns: Boolean.

Static memberPasteString(text)

ParameterTypeDescription
textString&

Returns: Boolean.

Static memberPixelsToFormUnits(ctrl, pixels, vertical)

Computes the number of form units based on the number of pixels.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
pixelsInt32
verticalBooleanIf the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Returns: Single.

Static memberPopulateList(ctrl, hSql, sql)

Populates a list box or combo box with a result set.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
hSqlSalSqlHandleSalSqlHandle to use to execute the sql command.
sqlStringSQL command to execute to populate the list.

Returns: Boolean.

Static memberPopulateList(ctrl, hSql, sql, errorHandler)

Populates a list box or combo box with a result set.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
hSqlSalSqlHandleSalSqlHandle to use to execute the sql command.
sqlStringSQL command to execute to populate the list.
errorHandlerWhenSqlErrorHandlerError handle callback.

Returns: Boolean.

Static memberPopulateListFiles(ctrl, ctrlPath, pathName, attributes)

ParameterTypeDescription
ctrlControl
ctrlPathControl
pathNameSalString&
attributesInt32

Returns: Boolean.

Static memberPostMessage(ctrl, msg, wParam, lParam)

Posts the specified message to a window by adding nMsg to handleReceiver's message queue.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgInt32
wParamIntPtr
lParamIntPtr

Returns: Boolean.

Static memberPreviewForm(ctrl)

Prints a form window, table window, or dialog box, including its contents and row header flags.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Static memberPrintForm(ctrl)

Prints a form window, table window, or dialog box, including its contents and row header flags.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Instance memberProcessWndProc(m)

ParameterTypeDescription
mMessage&

Instance memberRemoveMessageActions(handler)

Deprecated memberDeprecated: Deprecated. Use RemoveWindowActions() Removes the specified handler from the list.

ParameterTypeDescription
handlerDelegate

Instance memberRemoveWindowActions(handler)

Removes the specified handler from the list.

ParameterTypeDescription
handlerDelegate

Static memberScale(size, oldScale, newScale)

Scales the specified pixels by converting to form units first and then back to pixels using the new scaling factor.

ParameterTypeDescription
sizeSize
oldScaleSize
newScaleSize

Returns: Size.

Static memberScale(point, oldScale, newScale)

Scales the specified pixels by converting to form units first and then back to pixels using the new scaling factor.

ParameterTypeDescription
pointPoint
oldScaleSize
newScaleSize

Returns: Point.

Static memberSendMessage(ctrl, msg, wParam, lParam)

Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgInt32
wParamSalNumber
lParamSalNumber

Returns: SalNumber.

Static memberSendMessageToChildren(ctrl, msg, wParam, lParam)

Sends a message to all child items of a form window, dialog box, table window, or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgInt32
wParamSalNumber
lParamSalNumber

Returns: Boolean.

Static memberSendSalMessage(ctrl, msgCode, wParam, lParam)

Deprecated memberDeprecated: Deprecated. Use SalWindow.FireWindowActions(). Dispatches a Sal messages directly to the control's WindowActions handlers.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgCodeInt32
wParamSalNumber
lParamSalNumber

Returns: SalMessage.

Static memberSendValidateMessage()

Sends a SAM_Validate message to the object with the focus.

Returns: Int32.

Static memberSetContextMenu(ctrl, menuName, flags)

Defines the context menu for a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuNameString
flagsInt32

Returns: Boolean.

Static memberSetContextMenu(ctrl, menuType, flags)

Defines the context menu for a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuTypeType
flagsInt32

Returns: Boolean.

Static memberSetCursor(ctrl, cursor, type)

Sets a window's cursor.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
cursorCursor
typeInt32

Returns: Boolean.

Static memberSetCursor(ctrl, cursorId, type)

Sets a window's cursor.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
cursorIdInt32Specify one of these system-supplied cursors: CURSOR_Arrow CURSOR_Cross CURSOR_IBeam CURSOR_Icon CURSOR_Size CURSOR_SizeNESW CURSOR_SizeNS CURSOR_SizeNWSE CURSOR_SizeWE CURSOR_UpArrow CURSOR_Wait
typeInt32

Returns: Boolean.

Static memberSetCursor(ctrl, fileName, type)

Sets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
fileNameStringThe name of a cursor or an icon file.
typeInt32

Returns: Boolean.

Static memberSetCursor(ctrl, blob, type)

Sets a window's cursor from a string variable.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
blobByte[]
typeInt32

Returns: Boolean.

Static memberSetDataLength(ctrl, maxLength)

Sets a limit on the number of characters that a user can enter into a data field, multi line text field, or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
maxLengthInt32

Returns: Boolean.

Static memberSetDefaultButton(ctrl)

Sets the default push button of a form window or dialog box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberSetFocus(ctrl)

Sets the focus to a specified window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Control.

Static memberSetFont(ctrl, name, size, enhancement)

Sets a window's font, font size, and font enhancements.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nameString
sizeInt32
enhancementInt32

Returns: Boolean.

Static memberSetFormat(ctrl, format)

Sets the picture format of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
formatString

Returns: Boolean.

Static memberSetFormatCode(ctrl, format)

Sets a data field's or table window column's format.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
formatInt32

Returns: Boolean.

Static memberSetFormattedText(ctrl, text, applyFormat)

Copies a formatted string to a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textString
applyFormatBoolean

Returns: Boolean.

Static memberSetInputMask(ctrl, mask)

Sets the input mask of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
maskString

Returns: Boolean.

Static memberSetLabel(ctrl, label)

Changes the Label assigned to the specified control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
labelControl

Static memberSetLabelText(ctrl, text)

Sets the label text of a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textString

Returns: Boolean.

Static memberSetListRedraw(ctrl, redraw)

Turns off or on redrawing on the list box or combo box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
redrawBooleanTrue to redraw the control.

Returns: Boolean.

Static memberSetListSelectedIndex(ctrl, index)

Selects or deselects a combo box or single-selection list box entry. If the list box is multi select using -1 as the index value selects all items, while using any other invalid index value deselects all items. For normal list box, using -1 always deselects all items.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Index of the item to select. Use -1 to select all items and -2 to deselect all items.

Returns: Boolean.

Static memberSetListSelectedItems(ctrl, index, select)

Selects or deselects a combo box or multiple-selection list box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexInt32Index of the item to select or deselect. Use -1 to select or deselect all the items in the list.
selectBooleanTrue to select the specified item(s), false to deselect the item(s).

Returns: Boolean.

Static memberSetListSelectedText(ctrl, startIndex, text)

Finds and selects a combo box or single-selection list box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
startIndexInt32Position where to start the search for text .
textStringText to search for in the list.

Returns: Int32. Index of the first item that matches the text or -1 if not found.

Static memberSetListTabStops(ctrl, tabStops)

Sets tabs in a list box. List boxes use tabs to align columns of data.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
tabStopsSalArray<SalNumber>Array of tab stop position.

Returns: Boolean.

Static memberSetLocation(ctrl, pos)

Moves a window to a new position (x, y) on the X and Y axes.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
posPointF

Returns: Boolean.

Static memberSetModified(ctrl, modified)

Sets or clears the field modified flag for an editable data field, combo box, multi line text field, table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
modifiedBoolean

Returns: Boolean.

Static memberSetProfile(ctrl, profile)

Changes the custom profile of the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
profileInt32

Returns: Boolean.

Static memberSetProfileParameter(ctrl, paramCode, paramValue)

Alters the specified parameter for the custom profile associated to the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
paramCodeInt32
paramValueSalNumber

Returns: Boolean.

Static memberSetProfileParameter(ctrl, paramCode, paramValue)

Alters the specified parameter for the custom profile associated to the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
paramCodeInt32
paramValueSalString

Returns: Boolean.

Static memberSetProperty(ctrl, name, value)

Sets the value of a named property for a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nameString
valueString

Returns: Boolean.

Static memberSetScrollBarPosition(ctrl, pos)

Sets a scroll bar's position.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
posInt32

Returns: Boolean.

Static memberSetScrollBarRange(ctrl, min, max, line, page)

Sets a scroll bar's range, line increment, and page increment.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
minInt32
maxInt32
lineInt32
pageInt32

Returns: Boolean.

Static memberSetSize(ctrl, size)

Resizes a window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
sizeSizeF

Returns: Boolean.

Static memberSetStatusBarText(ctrl, text)

Updates the status bar of the top level form that owns the specified control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textString

Returns: Boolean.

Static memberSetStatusBarText(menu, text)

Updates the status bar of the form that owns the menu item.

ParameterTypeDescription
menuMenu
textString

Returns: Boolean.

Static memberSetText(ctrl, text)

Sets the text of a control to a specified string.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textString

Returns: Boolean.

Static memberSetTimer(ctrl, id, millisec)

Creates a system timer for a given control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
idInt32
millisecInt32

Returns: Boolean.

Static memberSetWindowColor(ctrl, colorIndex, nColor)

Sets a window's color.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
colorIndexInt32
nColorInt32

Returns: Boolean.

Static memberShowStatusBar(ctrl, visible)

Shows or hides the status bar on a top-level or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
visibleBoolean

Returns: Boolean.

Static memberShowToolBar(ctrl, visible)

Shows or hides the tool bar on a top-level or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
visibleBoolean

Returns: Boolean.

Static memberShowWindow(ctrl)

Makes a control visible.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean. True if the control was previously visible.

Static memberShowWindowAndLabel(ctrl)

Makes a control and its associated label visible.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberTrackPopupMenu(ctrl, menuName, flags, pos)

Shows context popup menu at runtime.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuNameString
flagsInt32
posPoint

Returns: Boolean.

Static memberTrackPopupMenu(ctrl, menuType, flags, pos)

Shows context popup menu at runtime.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuTypeType
flagsInt32
posPoint

Returns: Boolean.

Static memberTranslateColor(color)

Converts .NET colors to the corresponding SAL color constant.

ParameterTypeDescription
colorColor

Returns: Int32.

Static memberTranslateControl(ctrl)

Translate the parent control into a valid control instance: - if the ClientArea is passed returns the form - if a second base visual class is passed, returns the instance - if a embedded TableWindow control is passed, returns the parent TableWindowForm

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Control.

Static memberTranslateProfile(profile)

Translates CTD profile codes to the equivalent .NET CultureInfo.

ParameterTypeDescription
profileInt32

Returns: CultureInfo.

Static memberTranslateSalColor(colorValue)

Converts SAL colors to a .NET Color.

ParameterTypeDescription
colorValueInt32

Returns: Color. Color

Static memberUndo()

Undoes the last edit in the control with the focus.

Returns: Boolean.

Static memberUpdate(ctrl)

Forces the repaint of a control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: Boolean.

Static memberUpdateMainMenu(form)

Updates the form's main menu.

ParameterTypeDescription
formForm

Returns: Boolean.

Static memberValidate(ctrl, showErrorMessage)

Validates and formats a data field's or table window column's contents.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
showErrorMessageBoolean

Returns: Boolean.

Static memberWaitCursor(wait)

Displays or removes the hourglass cursor.

ParameterTypeDescription
waitBoolean

Returns: Boolean.

Static memberWinHelp(ctrl, file, command, index, key)

Starts the Windows help system.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
fileString
commandInt32
indexInt32
keyString

Returns: Boolean.

Static memberYield(ctrl)

Processes messages in the message loop. This function replaces all SalYield* functions. It must be placed in the loop that block execution.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.