Skip to main content
Version: 2023

SalWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Web.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 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 memberDropData

IDataObject: Returns the data object bring dropped 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.

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

Instance memberAddWinSDKCriticalEvents(events)

Returns critical events for the WinSDK messages emulation.

ParameterTypeDescription
eventsWiredEvents

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(ctrl)

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

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 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
ctrlControlControl to dispose.

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
ctrlControlControl to disable.

Returns: Boolean.

Static memberDisableWindowAndLabel(ctrl)

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

ParameterTypeDescription
ctrlControlControl to disable together with its associated label.

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(data)

Initiates drag-drop mode.

ParameterTypeDescription
dataObject

Returns: Boolean.

Instance memberDragDropStop()

Aborts drag mode.

Returns: Boolean.

Static memberEnableWindow(ctrl)

Enables keyboard and mouse input to a window.

ParameterTypeDescription
ctrlControlControl to enable.

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
ctrlControlDialog to terminate.
valueInt32Value to assign to the dialog's ReturnValue field.

Returns: Boolean.

Static memberFindChild(ctrl, name)

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

ParameterTypeDescription
ctrlControlContainer control.
nameStringThe name of the child control to find.

Returns: Control.

Static memberFindChild(ctrl, type)

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

ParameterTypeDescription
ctrlControlContainer control.
typeTypeThe Type of the child control to find.

Returns: Control.

Static memberFindControl(ctrl, name)

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

ParameterTypeDescription
ctrlControlContainer control.
nameStringThe name of the member control to find.

Returns: Control.

Static memberFindMember(ctrl, name)

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

ParameterTypeDescription
ctrlControlContainer control.
nameStringThe name of the member to find.

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.

Instance memberFireWinSDKEvent(e)

Processes the client event to generate the equivalent WinSDK message.

ParameterTypeDescription
eWisejEventArgs

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
verticalBoolean

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(form)

Returns the SalClientArea panel.

ParameterTypeDescription
formControl

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, multiline 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
parentControlParent control.
typeMaskInt32

Returns: Control.

Static memberGetFocus()

Returns 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 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)

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.

Static memberGetListSelectedFile(ctrl, fileName)

ParameterTypeDescription
ctrlControl
fileNameSalString&

Returns: Boolean.

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 listbox.

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(form)

Returns the MDI client area of the MDI container.

ParameterTypeDescription
formForm

Returns: MdiClient.

Static memberGetMessageName(msg)

ParameterTypeDescription
msgInt32

Returns: String.

Static memberGetNextChild(ctrl, typeMask)

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

ParameterTypeDescription
ctrlControlPrecedent control.
typeMaskInt32

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(form)

Returns the SalStatusBar control.

ParameterTypeDescription
formControl

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(colorIndex)

Gets a system color.

ParameterTypeDescription
colorIndexInt32

Returns: Int32. nColor

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(form)

Returns the SalToolbar control.

ParameterTypeDescription
formControl

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, multiline 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, multiline 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, multiline 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, multiline 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, multiline 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, multiline 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
ctrlControl
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 memberMessageBox(owner, text, title, flags, callback)

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

ParameterTypeDescription
ownerControlOwner of the message box.
textStringMessage text to display in the message box.
titleStringTitle to display in the caption area.
flagsInt32Combination of the Sys.MB_* flags to set the buttons and icons of the message box.
callbackAction<Int32>Optional callback handler. When set, the MessageBox is not modal.

Returns: SalNumber.

Static memberModalDialog(type, owner, args)

Creates a modal dialog box.

ParameterTypeDescription
typeTypeThe dialog to create.
ownerControlOwner of the dialog.
argsObject[]Optional startup arguments.

Returns: Int32. The value set when closing the dialog using EndDialog.

Static memberModalDialog(type, owner, callback, args)

Creates a modal dialog box.

ParameterTypeDescription
typeTypeThe dialog to create.
ownerControlOwner of the dialog.
callbackAction<Int32>Callback method, invoked when the dialog is closed.
argsObject[]Optional startup arguments.

Static memberModalDialog(typeName, owner, args)

Creates a modal dialog box.

ParameterTypeDescription
typeNameStringName of the dialog to create.
ownerControlOwner of the dialog.
argsObject[]Optional startup arguments.

Returns: Int32. The value set when closing the dialog using EndDialog.

Static memberModalDialogAsync(type, owner, args)

Creates a modal dialog box asynchronously.

ParameterTypeDescription
typeTypeThe dialog to create.
ownerControlOwner of the dialog.
argsObject[]Optional startup arguments.

Returns: Task<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
verticalBoolean

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
ctrlControl
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 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 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
ctrlControl
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
ctrlControl
msgInt32
wParamSalNumber
lParamSalNumber

Returns: Boolean.

Static memberSendMessageToChildrenInternal(ctrl, msg, wParam, lParam)

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

ParameterTypeDescription
ctrlControl
msgInt32
wParamSalNumber
lParamSalNumber

Returns: Boolean.

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
ctrlControl
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
ctrlControl
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, multiline 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
ctrlControl

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
ctrlControl
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 memberSetListSelectedIndex(ctrl, index)

Selects or deselects a combo box or single-selection list box entry. If the listbox is multiselect using -1 as the index value selects all items, while using any other invalid index value deselects all items. For normal listbox, 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 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, multiline 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
ctrlControl
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
ctrlControlControl that owns the timer.
idInt32Unique time id, sent back in Sys.wParam.
millisecInt32Interval in milliseconds.

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.

Instance memberShouldDispatch(code)

Returns true if the message should be dispatched. Messages are not dispatched if: - message dispatching is disabled - the control has not registered handlers - the control is disposed - the message is not handled by the control's handlers

ParameterTypeDescription
codeInt32

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, callback)

Shows context popup menu at runtime.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuNameString
flagsInt32
posPoint
callbackAction<ContextMenu>

Returns: Boolean.

Static memberTrackPopupMenu(ctrl, menuType, flags, pos, callback)

Shows context popup menu at runtime.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuTypeType
flagsInt32
posPoint
callbackAction<ContextMenu>

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(nColor)

Converts SAL colors to a .NET Color.

ParameterTypeDescription
nColorSalNumber

Returns: 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)

Deprecated memberDeprecated: Sal.WaitCursor is not supported. Displays or removes the hourglass cursor.

ParameterTypeDescription
waitBoolean

Returns: Boolean.