Skip to main content
Version: 2025

SalWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Web.50 (5.0.0.0)

Implements shared SAL window behavior for Wisej controls, including action dispatch, editing, forms, and compatibility services.

public class SalWindow

SAL controls delegate to an instance of this class. Static operations generally translate wrapped or secondary-base controls before accessing their underlying visual instance.

Example:

void UpdateCaption(Wisej.Web.Control control)
{
PPJ.Runtime.Windows.SalWindow.SetText(control, "Ready");
PPJ.Runtime.Windows.SalWindow implementation = control;
if (implementation != null)
implementation.NamedProperties["State"] = "Ready";
}

Constructors

Instance member SalWindow(salWnd)

Creates a SAL implementation and action manager for a window.

NameTypeDescription
salWndISalWindowThe SAL window to which this implementation belongs.

Properties

Static member DesignMode

Boolean: Gets whether Wisej is outside application runtime mode.

Static member DragLocation

Point: Gets the recorded drag-start location in source-control client coordinates.

Static member DragSource

Control: Gets the control recorded as the current SAL drag source.

Static member DropData

IDataObject: Gets the data object recorded for the current SAL drop operation.

Static member DropDisabled

Boolean: Gets or sets the SAL flag that disables acceptance of the current drop.

Static member DropLocation

Point: Gets the recorded drop location in target-control client coordinates.

Static member DropTarget

Control: Gets the control recorded as the current SAL drop target.

Static member KeepMask

Boolean: Gets or sets whether SAL text access retains input-mask characters.

Static member MapEnterToTab

Boolean: Gets or sets whether the client maps Enter to Tab navigation.

Changing the value updates both the current SAL application setting and the client-side mapping.

Instance member NamedProperties

SalNamedProperties: Gets the named-property collection, creating an empty collection on first access.

Methods

Static member AddListItem(ctrl, text)

Adds a text item to a supported list control.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
textStringThe item text to add.

Returns: Int32. The resulting item index, or Sys.LB_Err for an unsupported or unavailable control.

Instance member AddMessageActions(handler)

Deprecated memberDeprecated: Deprecated. Use AddWindowActions() Registers a delegate with this window's action manager.

ParameterTypeDescription
handlerDelegateThe action delegate to register.

This obsolete entry point is equivalent to AddWindowActions.

Instance member AddMessageActions(target)

Deprecated memberDeprecated: Deprecated. Use AddWindowActions(). Adds another window's registered action handlers to this window.

ParameterTypeDescription
targetISalWindowThe SAL window whose handlers are copied into this instance.

This obsolete entry point delegates to AddWindowActions.

Instance member AddWindowActions(handler)

Registers a delegate with this window's action manager.

ParameterTypeDescription
handlerDelegateThe action delegate to register.

Instance member AddWindowActions(target)

Adds another window's registered action handlers to this window.

ParameterTypeDescription
targetISalWindowThe SAL window whose handlers are copied into this instance.

Instance member AddWinSDKCriticalEvents(events)

Registers browser keyboard events when WinSDK keyboard messages require dispatch.

ParameterTypeDescription
eventsWiredEventsThe mutable browser-event registration collection.

Adds keydown and keyup when WM_KEYDOWN, WM_CHAR, or WM_KEYUP passes the dispatch filter.

Static member BringToTop(ctrl)

Brings the specified control to the front, or activates it when it is a top-level or MDI form.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the translated control exists and is not disposed; otherwise, false.

Static member CanCopy()

Checks whether the focused control has content that can be copied.

Returns: Boolean. True when SAL finds selected text, selected table rows, or other copyable content; otherwise, false.

Static member CanCut()

Checks whether the focused control has content that can be cut.

Returns: Boolean. True when the focused control passes SAL enabled, editability, and selection checks; otherwise, false.

Static member CanPaste()

Checks whether SAL permits pasting into the focused control.

Returns: Boolean. The focused control's SAL paste-availability result.

Static member CanUndo()

Reports SAL undo-command availability for the focused control.

Returns: Boolean. True when a focused control is available; otherwise, false.

This compatibility check does not inspect undo history or guarantee that Undo can perform an undo.

Static member Center(ctrl)

Centers the specified window within its parent, owner, or available screen area.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the centering operation is accepted; false for an unavailable control, design mode, or unavailable screen bounds.

Static member Clear()

Dispatches the clear clipboard command to the focused control.

Returns: Boolean. The table or column command result, or true when ordinary control content is cleared; false if no target is available.

Static member Clear(ctrl)

Clears editable text or selection according to the control type.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. False for an unavailable control or a form; otherwise, true.

Text fields and labels are emptied; check boxes are unchecked; list selections are cleared. Other control types are left unchanged.

Static member ClearCursor(ctrl, type)

Restores the default cursor for the requested role.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
typeInt32The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Only the window role changes the displayed cursor. Drag/drop roles are accepted for SAL windows without changing a cursor.

Static member ClearList(ctrl)

Removes all items from a supported list control.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.

Returns: Boolean. True if the control supports list clearing; otherwise, false.

The ordinary combo-box fallback also clears its text.

Static member Copy()

Copies the focused control's selected text or content to the clipboard.

Returns: Boolean. The table or column command result, or true after copying ordinary control content; false if no target is available.

Static member CopyProfile(ctrl, profile)

Copies number and date/time format settings into a control's writable culture.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
profileInt32The SAL profile or locale identifier supplying the format settings.

Returns: Boolean. False for an unavailable control or a SAL edit control with a missing/read-only culture; otherwise, true.

Static member CopyString(text)

Writes a string to the clipboard as Unicode text.

ParameterTypeDescription
textStringThe text to place on the clipboard.

Clipboard exceptions are traced and suppressed.

Static member CreateFont(name, size, enhancement)

Creates a point-sized font from a family name and SAL enhancement flags.

ParameterTypeDescription
nameStringThe font family name.
sizeSingleThe size in points; nonpositive values use 8 points.
enhancementInt32The combined bold, italic, underline, and strikeout FONT_Enh flags.

Returns: Font. The created font, or null when the name is null or empty.

Static member CreateWindow(type, owner, args)

Creates and shows a modeless form of the specified type.

ParameterTypeDescription
typeTypeThe form type to instantiate.
ownerControlThe owning control or form.
argsObject[]Arguments used by the form creation path.

Returns: Control. The created form, or null if it was disposed during creation.

An ordinary form owned by an MDI container is assigned that MDI parent.

Static member CreateWindow(typeName, parent, args)

Resolves a form type relative to the calling assembly, then creates and shows it.

ParameterTypeDescription
typeNameStringThe application form type name.
parentControlThe owning control or form.
argsObject[]Arguments used by the form creation path.

Returns: Control. The created form, or null if it was disposed during creation.

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

Creates a SAL form with child-window, visibility, and border options.

ParameterTypeDescription
typeTypeThe SAL form type to create.
parentControlThe parent or owner; required for child-form creation.
leftSingleThe child form's horizontal position in form units.
topSingleThe child form's vertical position in form units.
widthSingleThe child form's width in form units.
heightSingleThe child form's height in form units.
flagsInt32The combined CREATE_AsChild, CREATE_Hidden, and CREATE_Border options.
argsObject[]Arguments used by the form creation path.

Returns: Control. The created form, or null when child creation has no parent or the form is disposed during creation.

Bounds are applied through embedded SalForm creation; other form types use their normal show behavior.

Static member CreateWindow(typeName, parent, left, top, width, height, flags)

Resolves and creates a SAL form with child-window, visibility, and border options.

ParameterTypeDescription
typeNameStringThe form type name resolved relative to the calling assembly.
parentControlThe parent or owner; required for child-form creation.
leftSingleThe child form's horizontal position in form units.
topSingleThe child form's vertical position in form units.
widthSingleThe child form's width in form units.
heightSingleThe child form's height in form units.
flagsInt32The combined CREATE_AsChild, CREATE_Hidden, and CREATE_Border options.

Returns: Control. The created form, or null when the underlying creation path does not retain a live form.

Static member Cut()

Copies and clears content from the focused control.

Returns: Boolean. The table or column command result, or true after processing ordinary control content; false if no target is available.

Call CanCut when command availability must respect the control's editability.

Static member DeleteListItem(ctrl, index)

Removes an item from a supported list control.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The zero-based item index.

Returns: Int32. The remaining item count, or Sys.LB_Err for an invalid index or unsupported control.

Static member Destroy(ctrl)

Closes the specified window when it is a form, or disposes the control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

A true result reports that the close or disposal request was made; a form can apply its own closing behavior.

Static member DisableWindow(ctrl)

Disables input to the specified control, or clears editability for a table column.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member DisableWindowAndLabel(ctrl)

Disables input to the specified control and disables its associated label.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member DragAcceptFiles(ctrl, accept)

Changes whether a control allows drops.

ParameterTypeDescription
ctrlControlThe drop-target control.
acceptBooleanThe new value of the control's AllowDrop property.

Returns: Boolean. True if the control is resolved; otherwise, false.

Instance member DragDropStart(data)

Initializes SAL drag state, dispatches SAM_DragStart, and starts a drag operation unless canceled.

ParameterTypeDescription
dataObjectThe data supplied to Wisej drag-and-drop.

Returns: Boolean. True if the SAL DropDisabled flag remains false; otherwise, false.

The source location is captured in client coordinates. Calling DragDropStop during the start action prevents the Wisej drag call.

Instance member DragDropStop()

Clears the current SAL drag source to stop or cancel drag processing.

Returns: Boolean. True if a drag source was active; otherwise, false.

Static member EnableWindow(ctrl)

Enables input to the specified control, or enables editing for a table column.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

For text-box controls, this operation also clears the read-only setting.

Static member EnableWindowAndLabel(ctrl)

Enables input to the specified control and enables its associated label.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member EndDialog(ctrl, value)

Sets a dialog result and requests closure of a modal or modeless dialog.

ParameterTypeDescription
ctrlControlThe dialog form to close.
valueInt32The SAL return value or ordinary DialogResult value.

Returns: Boolean. True when closure is requested; false for non-dialog targets or a SAL dialog already marked closed.

Static member FindChild(ctrl, name)

Searches the specified window for a child control by name.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
nameStringThe child control name to locate.

Returns: Control. The matching child control, or null if no child is found.

Static member FindChild(ctrl, type)

Searches a control's child hierarchy for a control of the specified type.

ParameterTypeDescription
ctrlControlThe parent control in which to search.
typeTypeThe requested child type.

Returns: Control. The matching control, or null if the parent cannot be resolved or no child matches.

Static member FindControl(ctrl, name)

Reads a named application member and returns its value as a control.

ParameterTypeDescription
ctrlControlThe control whose member is inspected.
nameStringThe member name.

Returns: Control. The member value if it is a control; otherwise, null.

Throws:

Static member FindMember(ctrl, name)

Finds an application member on a control and exposes read/write access through a reference object.

ParameterTypeDescription
ctrlControlThe control whose translated runtime type is inspected.
nameStringThe member name to resolve.

Returns: ReferenceInfo. A reference to the resolved member.

Throws:

Static member FireWindowActions(ctrl, msgCode, wParam, lParam)

Dispatches a SAL action through the target's derived control instance.

ParameterTypeDescription
ctrlControlThe target control.
msgCodeInt32The SAL or application-defined action code.
wParamSalNumberThe first action parameter.
lParamSalNumberThe second action parameter.

Returns: WindowActionsEventArgs. The action event data, including its return value; empty event data when no SAL implementation exists.

The full control-translation path is intentionally bypassed to avoid duplicate message routing.

Static member FireWindowActionsToChildren(ctrl, msg, wParam, lParam)

Dispatches a SAL message to the specified control's children.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
msgInt32The SAL or application-defined message code.
wParamSalNumberThe first message parameter.
lParamSalNumberThe second message parameter.

Returns: Boolean. The result of child-message dispatch; false if the parent is unavailable or disposed.

Instance member FireWinSDKEvent(e)

Translates supported browser mouse, keyboard, and size events into WinSDK window actions.

ParameterTypeDescription
eWisejEventArgsThe browser event and its pointer or keyboard data.

Returns: Boolean. The dispatch-filter result for the translated message group; unrecognized event types retain the default true result.

Static member FormUnitsToPixels(ctrl, units, vertical)

Converts a length in form units to pixels using the specified control's form metrics.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
unitsSingleThe length in form units.
verticalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: Int32. The converted pixel length.

Static member FromHandle(handle, type)

Resolves a SAL window handle and casts the translated control through SAL inheritance rules.

ParameterTypeDescription
handleSalWindowHandleThe window handle to resolve.
typeTypeThe required application or framework type.

Returns: Object. The cast object, or null when the handle does not resolve to a control.

Throws:

Static member GetCancelButton(ctrl)

Gets a form's cancel button.

ParameterTypeDescription
ctrlControlThe form to inspect.

Returns: Control. The button as a control, or null when the target is not a form or has no compatible button.

Static member GetClassName(ctrl)

Gets the application class name associated with the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: String. The application class name, an empty string for runtime-defined classes, or null if the control cannot be resolved.

Forms are represented by their base type; nested table-window types are resolved to their non-nested base.

Static member GetClientArea(form)

Finds a form's SAL client area accessory.

ParameterTypeDescription
formControlThe form or container to search.

Returns: SalFormClientArea. The matching SAL accessory, or null when none is found.

Static member GetControlName(ctrl)

Gets the specified control's name.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: String. The control name, or an empty string when the control cannot be resolved.

Static member GetControlName(ctrl, sName)

Copies the specified control's name to the supplied variable.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
sName by referenceSalStringReceives the control name when the operation succeeds.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member GetControlType(ctrl)

Gets the SAL window type of the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Int32. The SAL Sys.TYPE_* code for the translated control.

Static member GetDataLength(ctrl)

Gets a SAL edit control's input-length limit.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Int32. The maximum length, with zero and 32767 reported as -1; zero when the control is not a SAL edit control.

Static member GetDataType(ctrl)

Gets the SAL data type represented by the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Int32. The SAL data-type code, or zero if the translated control does not implement the SAL value contract.

Static member GetDefaultButton(ctrl)

Gets a form's accept button.

ParameterTypeDescription
ctrlControlThe form to inspect.

Returns: Control. The button as a control, or null when the target is not a form or has no compatible button.

Static member GetFirstChild(parent, typeMask)

Finds the first child matching a SAL window-type mask.

ParameterTypeDescription
parentControlThe control on which to perform the SAL operation.
typeMaskInt32The SAL window types to include; zero matches no controls.

Returns: Control. The first matching child control, or null if no child matches.

Ordinary controls use tab order; table columns use their creation order, and MDI forms use their child-form collection.

Static member GetFocus()

Resolves the focused SAL control from the active form and nested active containers.

Returns: SalWindowHandle. The translated focused control handle, the active form when no child is active, or a null SAL handle when no form is active.

Static member GetFont(ctrl, sName, nSize, nEnhancement)

Reads the control font's family, point size, and style flags.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
sName by referenceSalStringReceives the font family name.
nSize by referenceSalNumberReceives the size in points.
nEnhancement by referenceSalNumberReceives the combined Sys.FONT_Enh* style flags.

Returns: Boolean. True if a font was available; otherwise, false.

Static member GetFont(font, name, size, enhancement)

Reads a font's family, point size, and SAL style flags.

ParameterTypeDescription
fontFontThe font to inspect.
name by referenceStringReceives the family name.
size by referenceSingleReceives the point size.
enhancement by referenceInt32Receives the combined bold, italic, strikeout, and underline Sys.FONT_Enh* flags.

Returns: Boolean. False if the font is null; otherwise, true.

Static member GetFontNames()

Enumerates font-family names installed on the application server.

Returns: String[]. An array of installed family names.

Static member GetFormat(ctrl)

Gets the format picture of a SAL edit control.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: String. The format picture, or null for a control without SAL editing support.

Static member GetFormatCode(ctrl)

Classifies a control's format picture, character casing, or password display as a SAL format code.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Int32. A Sys.FMT_Format_* code; unformatted when no supported format or presentation setting is found.

Static member GetFormattedText(ctrl, format)

Converts an editable control's value to text, optionally using its SAL format.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
formatBooleanTrue to apply the SAL format for number and date values and mask handling for string values; false to use the value's ordinary string conversion.

Returns: String. The converted text, an empty string for a null value, or null for a noneditable target.

Static member GetHintText(ctrl)

Gets the watermark text of a text box or combo box.

ParameterTypeDescription
ctrlControlThe control whose hint is queried.

Returns: String. The watermark, or null for unsupported controls.

Static member GetInputMask(ctrl)

Gets the input mask of a SAL edit control.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: String. The edit mask, or null for a control without SAL editing support.

Static member GetLabel(ctrl)

Gets the label associated with a control.

ParameterTypeDescription
ctrlControlThe control whose label is requested.

Returns: Control. The associated label, or null when no label can be resolved.

SAL forms use their label mapping; other forms use the runtime's label-discovery fallback.

Static member GetLabelText(ctrl)

Gets a control's own label text or the text of its associated label.

ParameterTypeDescription
ctrlControlThe control whose label is queried.

Returns: String. Nonempty inline label text when supported; otherwise, the associated label text. Returns an empty string if no label exists, or null if the control cannot be resolved.

Static member GetLabelText(ctrl, maxLen)

Gets the specified control's associated label text.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
maxLenInt32The maximum number of leading characters to return.

Returns: String. The label text limited to the requested length, or an empty string if no label exists.

Static member GetLabelText(ctrl, sText, maxLen)

Copies the associated label text to a supplied variable.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
sText by referenceSalStringReceives the label text when it can be read.
maxLenInt32The maximum number of leading characters to copy.

Returns: SalNumber. The number of characters copied, or zero if no label text is available.

Static member GetListItemsCount(ctrl)

Gets the number of items in a supported list control.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.

Returns: Int32. The item count, or Sys.LB_Err for an unsupported or unavailable control.

Static member GetListItemState(ctrl, index)

Tests an item's selection state.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The zero-based item index.

Returns: Boolean. The SAL list's selection result, the list-box selection state, or whether a combo box's selected index equals the requested index; false for unsupported controls.

Static member GetListItemText(ctrl, index)

Gets an item's string representation.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The zero-based item index.

Returns: String. The converted item text, or null when the item or supported control is unavailable.

Static member GetListItemText(ctrl, index, text)

Copies an item's string representation to a SAL string.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The zero-based item index.
text by referenceSalStringReceives the item text on success; otherwise remains unchanged.

Returns: Int32. The copied character count, or Sys.LB_Err when item text is unavailable.

Static member GetListItemTextLength(ctrl, index)

Gets the character count of an item's string representation.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The zero-based item index.

Returns: Int32. The character count, or Sys.LB_Err when item text is unavailable.

Static member GetListSelectedFile(ctrl, fileName)

Decodes a selected entry created by file-list population.

ParameterTypeDescription
ctrlControlThe SAL file-list control.
fileName by referenceSalStringReceives the selected file name, directory with a trailing backslash, or drive designation. Remains unchanged when no selection is available.

Returns: Boolean. True for a directory or drive entry; false for a file entry or unavailable selection.

A false result can still return a valid file name.

Static member GetListSelectedFile(ctrl)

Gets the decoded name of a selected file-list entry.

ParameterTypeDescription
ctrlControlThe SAL file-list control.

Returns: String. The file name, directory with trailing backslash, or drive designation; an empty string when no selection is available.

Static member GetListSelectedIndex(ctrl)

Gets a supported list control's current selection index.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.

Returns: Int32. The zero-based selection index, or Sys.LB_Err if the control is unavailable or unsupported. A supported control returns -1 when no item is selected.

Static member GetListSelectedItems(ctrl, selectedArray)

Copies available selected item indices into a dynamic SAL array.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
selectedArraySalArray<SalNumber>The output array, made dynamic and reset before selected indices are copied.

Returns: Boolean. True when at least one index is copied; false if no selection collection is available or it is empty.

When no collection is available, the supplied array is left unchanged.

Static member GetListSelectedItemsCount(ctrl)

Gets the number of selected items from a SAL multiple-selection list.

ParameterTypeDescription
ctrlControlThe SAL list control whose selection is counted.

Returns: Int32. The selected count for multiple-selection mode, -1 for single-selection mode, or zero when selection is disabled or the target is unavailable.

Use a control implementing ISalListControl. The ordinary ListBox fallback dereferences the absent SAL interface and can throw.

Static member GetLocation(ctrl)

Gets a control's location expressed in form units.

ParameterTypeDescription
ctrlControlThe control whose location is read.

Returns: PointF. The location in form units, or an empty point when the control cannot be resolved.

Static member GetMdiClient(form)

Finds the MDI client area of a container form.

ParameterTypeDescription
formFormThe MDI container to inspect.

Returns: MdiClient. The MDI client, or null for an absent or non-MDI form.

Static member GetMessageName(msg)

Gets the runtime's symbolic name for a recognized WinSDK message.

ParameterTypeDescription
msgInt32The Windows message code.

Returns: String. The stored message name, or an empty string for an unrecognized code.

Static member GetNextChild(ctrl, typeMask)

Finds the next sibling matching a SAL window-type mask.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
typeMaskInt32The SAL window types to include; zero matches no controls.

Returns: Control. The next matching control, or null if no control matches.

Static member GetParent(ctrl)

Gets the SAL parent form, owner, or table container for the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Control. The SAL parent form, owner, or table container, or null when none can be resolved.

Static member GetProfile(ctrl)

Maps a control's formatting culture to a SAL profile identifier.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Int32. The default or program profile, a recognized country profile, or the culture's locale identifier.

A writable culture is reported as Sys.FMT_Profile_Program.

Static member GetProfileParameter(ctrl, paramCode, paramValue)

Reads a numeric parameter from the control's formatting culture.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
paramCodeInt32The supported Sys.FMT_Parm_* parameter code.
paramValue by referenceSalNumberReceives the parameter value when its code is recognized.

Returns: Boolean. True for a recognized parameter code; otherwise, false.

The current SAL culture is used when the control has no culture. Date type and leading-zero parameters include compatibility defaults.

Static member GetProfileParameter(ctrl, paramCode, paramValue)

Reads a text parameter from the control's formatting culture.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
paramCodeInt32The supported Sys.FMT_Parm_* parameter code.
paramValue by referenceSalStringReceives the parameter value when its code is recognized.

Returns: Boolean. True for a recognized parameter code; otherwise, false.

The current SAL culture is used when the control has no culture.

Static member GetProperty(ctrl, name)

Gets the value of a SAL named property.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
nameStringThe property name.

Returns: String. The property value, or null if the property or SAL window is unavailable.

Static member GetProperty(ctrl, name, sValue)

Reads a SAL named property into a supplied variable.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
nameStringThe property name.
sValue by referenceSalStringReceives the value only when the property is found.

Returns: Boolean. True if a non-null property value was found; otherwise, false.

Static member GetSalMessageName(msg)

Gets the symbolic name of a recognized SAL action.

ParameterTypeDescription
msgInt32The SAL action code.

Returns: String. The SAM name for recognized codes, or the numeric code converted to text.

Static member GetScrollBarPosition(ctrl)

Reads the value of a translated trackbar control.

ParameterTypeDescription
ctrlControlThe target control, which must resolve to a Wisej TrackBar.

Returns: Int32. The trackbar value, or zero for other control types.

Static member GetScrollBarRange(ctrl, nMin, nMax, nLine, nPage)

Reads a scrollbar's range and increments.

ParameterTypeDescription
ctrlControlThe scrollbar control.
nMin by referenceSalNumberReceives the minimum.
nMax by referenceSalNumberReceives the maximum, including SAL scrollbar adjustments.
nLine by referenceSalNumberReceives the small-change increment.
nPage by referenceSalNumberReceives the large-change increment.

Returns: Boolean. False for a null input; otherwise, true. A non-scrollbar target produces zero for all outputs.

Static member GetSize(ctrl)

Gets a control's dimensions expressed in form units.

ParameterTypeDescription
ctrlControlThe control whose size is read.

Returns: SizeF. The size in form units, or an empty size when the control cannot be resolved.

Static member GetSortedControls(parent)

Returns child controls in the runtime's traversal order.

ParameterTypeDescription
parentControlThe non-null parent control.

Returns: Control[]. A child-control array sorted by tab index, or the specialized table-window ordering for table containers.

Static member GetState(ctrl)

Gets the visibility and form-state classification of the specified window.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Int32. A Sys.Window_* state code; visible non-form controls report Sys.Window_Normal.

Static member GetStatusBar(form)

Finds a form's SAL status bar accessory.

ParameterTypeDescription
formControlThe form or container to search.

Returns: SalFormStatusBar. The matching SAL accessory, or null when none is found.

Static member GetStatusBarText(ctrl)

Gets the status text of the top-level form associated with a control.

ParameterTypeDescription
ctrlControlThe control used to locate the form.

Returns: String. The status-bar text, or an empty string if no status bar is found.

MDI child forms use the MDI parent's status bar.

Static member GetSysColor(colorIndex)

Translates a system-color index to a Win32 color value.

ParameterTypeDescription
colorIndexInt32A SAL system-color constant or system-color index.

Returns: Int32. The translated Win32 color value.

Static member GetText(ctrl)

Gets a control's text using SAL mask handling.

ParameterTypeDescription
ctrlControlThe control whose text is read.

Returns: String. The text returned by SAL mask processing, or null if the control cannot be resolved.

Static member GetText(ctrl, text, maxLen)

Copies the specified control's displayed text or long-string value to a SAL string.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
text by referenceSalStringReceives the retrieved text.
maxLenInt32The maximum character count for ordinary text; ignored for a Sys.DT_LongString value.

Returns: Int32. The number of characters copied, or zero when no text is available.

Static member GetText(ctrl, maxLen)

Gets the specified control's displayed text or long-string value.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
maxLenInt32The maximum character count for ordinary text; ignored for a Sys.DT_LongString value.

Returns: SalString. The retrieved text, or an empty string if the control cannot be resolved.

Static member GetTextUnmasked(ctrl)

Gets a control's text with SAL input-mask processing removed.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: SalString. The unmasked SAL string, or a SAL null string when retrieval fails.

Static member GetToolBar(form)

Finds a form's SAL toolbar accessory.

ParameterTypeDescription
formControlThe form or container to search.

Returns: SalFormToolBar. The matching SAL accessory, or null when none is found.

Static member GetWindowColor(ctrl, colorIndex)

Reads a window or cell color as a Win32 color value.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
colorIndexInt32The Sys.COLOR_Index* color component to read.

Returns: Int32. The color encoded as a Win32 color value, or zero if the control is unavailable.

Static member HasAccessories(ctrl)

Tests whether a form directly contains any SAL accessory controls.

ParameterTypeDescription
ctrlControlThe form to inspect.

Returns: Boolean. True if a direct child implements the SAL accessory contract; false for other controls or forms without accessories.

Static member HideWindow(ctrl)

Hides the specified control or table column.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. The visibility state before the operation, or false if the control cannot be resolved.

Static member HideWindowAndLabel(ctrl)

Hides the specified control and its associated label.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. The control's visibility before the operation, or false if it cannot be resolved.

Static member InsertListItem(ctrl, index, text)

Inserts a text item into a supported list control.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The insertion position from zero through the item count, or -1 to append.
textStringThe item text to insert.

Returns: Int32. The insertion result from the list, or Sys.LB_Err for an invalid position or unsupported control.

Static member Invalidate(ctrl)

Invalidates the specified control and its child controls for repainting.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member IsChecked(ctrl)

Reads the checked state of a check box or radio button.

ParameterTypeDescription
ctrlControlThe target control.

Returns: Boolean. The checked state, or false for other control types.

Static member IsDerivedFrom(ctrl, type)

Tests the specified control's runtime type against an application base type.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
typeTypeThe type to test, including the framework's emulated inheritance relationships.

Returns: Boolean. True if the runtime type derives from the requested type; otherwise, false.

Static member IsEmpty(ctrl)

Tests whether an editable control has no unmasked text.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Boolean. True when the control is editable and its unmasked text is null or empty; otherwise, false.

Static member IsEnabled(ctrl)

Determines whether the specified control accepts input.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. The enabled state, or the editable flag for a table column; false if the control cannot be resolved.

Static member IsKeyboardMessage(msg)

Tests whether a message falls in the WinSDK keyboard-message interval.

ParameterTypeDescription
msgInt32The message code.

Returns: Boolean. True from WM_KEYFIRST through WM_KEYLAST, inclusive; otherwise, false.

Static member IsModified(ctrl)

Reads the specified control's SAL modification flag.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the control reports a modified value; otherwise, false.

Static member IsMouseMessage(msg)

Tests whether a message falls in the WinSDK mouse-message interval.

ParameterTypeDescription
msgInt32The message code.

Returns: Boolean. True from WM_MOUSEFIRST through WM_MOUSELAST, inclusive; otherwise, false.

Static member IsSalMessage(msg)

Tests whether a message code appears in the runtime's recognized SAL-action set.

ParameterTypeDescription
msgInt32The message code to classify.

Returns: Boolean. True for an explicitly recognized SAL action; otherwise, false.

Static member IsScrollBarVisible(control, bars)

Checks scrollbar visibility on an initialized scrollable control.

ParameterTypeDescription
controlControlThe non-null control to inspect.
barsScrollBarsThe scrollbar selection to test.

Returns: Boolean. The requested horizontal or vertical state; Both requires both bars. None returns true unless both bars are visible. Uncreated or nonscrollable controls return false.

Static member IsValid(ctrl)

Validates the current value against a SAL edit control's data type.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Boolean. The control's data-type validation result, or false when the target lacks SAL editing support.

Static member IsValidDateTime(ctrl)

Tests whether the control's masked text is a valid date/time for its format and culture.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Boolean. True if the editable control's text passes SAL date/time validation; otherwise, false.

Static member IsValidDecimal(ctrl, precision, scale)

Tests masked control text against a decimal precision and scale.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
precisionInt32The allowed decimal precision.
scaleInt32The allowed number of fractional digits.

Returns: Boolean. True when the editable text passes SAL decimal validation using the control's format and culture; otherwise, false.

Static member IsValidEditMask(mask)

Checks the minimal SAL edit-mask syntax rules.

ParameterTypeDescription
maskStringThe mask to check.

Returns: Boolean. True for a nonempty mask containing no asterisk or exactly one final asterisk; otherwise, false.

Other mask characters are not validated by this method.

Static member IsValidFormat(format, code)

Tests a numeric or date/time format by formatting and parsing a sample value.

ParameterTypeDescription
formatStringThe format string to test.
codeInt32Use Sys.FMT_Pic_Number or Sys.FMT_Pic_DateTime.

Returns: Boolean. True if the sample converts back to a non-null SAL value; false for unsupported codes or conversion exceptions.

Static member IsValidInteger(ctrl)

Tests whether the control's masked text is a valid SAL integer.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Boolean. True if the editable text passes integer validation using the control's format; otherwise, false.

Static member IsValidNumber(ctrl)

Tests whether the control's text without its mask is a valid SAL number.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.

Returns: Boolean. True if the editable text passes numeric validation using the control's format and culture; otherwise, false.

Static member IsVisible(ctrl)

Determines whether the specified control is visible.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. The visible state, or the visibility flag for a table column; false if the control cannot be resolved.

Static member KillTimer(ctrl, id)

Stops an existing timer owned by the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
idInt32The identifier used when the timer was started.

Returns: Boolean. True if the timer was found and stopped; otherwise, false.

The timer remains registered and can be restarted by SetTimer.

Static member ListGetMultiSelect(ctrl)

Gets selected indices through the SAL list-selection compatibility path.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.

Returns: IList. Selected indices for a SAL list in multiple-selection mode. The ordinary Wisej list-box fallback returns its selected-index collection only when its mode is not a multiple-selection mode; other cases return null.

Static member MessageBox(owner, text, title, flags, callback, allowHtml)

Displays a Wisej message box using SAL button, icon, and default-button flags.

ParameterTypeDescription
ownerControlThe control used to locate the owner form and active MDI child.
textStringThe message body.
titleStringThe dialog title.
flagsInt32The combined button, icon, and default-button flags.
callback optionalAction<Int32>An optional callback receiving the result after the message box closes.
allowHtml optionalBooleanTrue to render the supplied message as HTML; false to escape it and preserve plain-text spacing.

Returns: SalNumber. The selected result when no callback is supplied; otherwise, zero after registering the callback.

Static member ModalDialog(type, owner, args)

Creates and shows a SAL modal dialog.

ParameterTypeDescription
typeTypeThe SAL dialog type; MDI and form-table-window subclasses are rejected.
ownerControlThe dialog owner.
argsObject[]Arguments used by the dialog creation path.

Returns: Int32. The dialog's SAL return value.

Static member ModalDialog(type, owner, callback, args)

Creates a SalForm dialog and invokes a callback when it closes.

ParameterTypeDescription
typeTypeThe SAL dialog type; MDI and form-table-window subclasses are rejected.
ownerControlThe dialog owner.
callbackAction<Int32>The callback receiving the dialog return value.
argsObject[]Arguments used by the dialog creation path.

Static member ModalDialog(typeName, owner, args)

Resolves a dialog type relative to the calling assembly and shows it modally.

ParameterTypeDescription
typeNameStringThe application dialog type name.
ownerControlThe dialog owner.
argsObject[]Arguments used by the dialog creation path.

Returns: Int32. The dialog's SAL return value.

Static member ModalDialogAsync(type, owner, args)

Creates and shows a SalForm dialog asynchronously.

ParameterTypeDescription
typeTypeThe SAL dialog type; MDI and form-table-window subclasses are rejected.
ownerControlThe dialog owner.
argsObject[]Arguments used by the dialog creation path.

Returns: Task<Int32>. A task that completes with the dialog return value.

Static member Move(ctrl, offset)

Moves a control relative to its current location using form-unit offsets.

ParameterTypeDescription
ctrlControlThe control to move.
offsetPointFThe horizontal and vertical offsets in form units.

Returns: Boolean. True if the control was resolved and moved; otherwise, false.

Static member Paste()

Pastes clipboard text into the focused control.

Returns: Boolean. The table or column command result, or true after assigning ordinary control text; false if no target is available.

Call CanPaste to check SAL command availability before invoking this operation.

Static member PasteString(text)

Reads Unicode text from the clipboard.

ParameterTypeDescription
text by referenceStringReceives the clipboard text on success; remains unchanged when no compatible text is available.

Returns: Boolean. True if Unicode text was obtained; otherwise, false.

Static member PixelsToFormUnits(ctrl, pixels, vertical)

Converts a pixel length to form units using the specified control's form metrics.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
pixelsInt32The pixel length to convert.
verticalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: Single. The converted length in form units.

Static member PopulateList(ctrl, hSql, sql)

Executes a query and populates a list with its result rows.

ParameterTypeDescription
ctrlControlThe target list control.
hSqlSalSqlHandleThe connected SQL handle used to execute and read the query.
sqlStringThe statement to prepare, or an empty value to execute the handle's previously prepared statement.

Returns: Boolean. True if query execution and supported-list population succeed; otherwise, false.

After successful preparation and execution, existing items are cleared. Each result row becomes one item with tab-separated field values. Trailing spaces are trimmed when the SQL handle enables autotrim.

Static member PopulateList(ctrl, hSql, sql, errorHandler)

Populates a list from a query under a temporary SQL-error handler.

ParameterTypeDescription
ctrlControlThe target list control.
hSqlSalSqlHandleThe connected SQL handle used to execute and read the query.
sqlStringThe statement to prepare, or an empty value to execute the handle's previously prepared statement.
errorHandlerWhenSqlErrorHandlerThe SQL-error handler active during preparation, execution, and fetching.

Returns: Boolean. The result of the underlying list-population operation.

After successful preparation and execution, existing items are cleared. Each result row becomes one item with tab-separated field values. Trailing spaces are trimmed when the SQL handle enables autotrim.

Static member PopulateListFiles(ctrl, ctrlPath, pathName, attributes)

Replaces a SAL list with file, directory, and drive entries from a server-side path.

ParameterTypeDescription
ctrlControlThe target control implementing the SAL list contract.
ctrlPathControlAn optional control whose text receives the resolved directory.
pathName by referenceSalStringOn entry, the directory or wildcard specification; on success, receives the wildcard portion.
attributesInt32The Sys.FA_* flags controlling which entries are listed.

Returns: Boolean. True when enumeration and population complete; false for an unsupported control or a caught I/O error.

The operation clears existing items before enumeration and changes the process current directory. Directory entries use brackets, and drive entries use the form [-c-].

Static member PostMessage(ctrl, msg, wParam, lParam)

Queues a SAL window action for later dispatch on the application context.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
msgInt32The SAL or application-defined message code.
wParamIntPtrThe first message parameter.
lParamIntPtrThe second message parameter.

Returns: Boolean. True if the action was queued; false if the control is unavailable or disposed.

Static member PreviewForm(ctrl)

Invokes Wisej application printing for a translated form.

ParameterTypeDescription
ctrlControlThe form to print; other control types are ignored.

This web implementation uses the same printing operation as PrintForm.

Static member PrintForm(ctrl)

Invokes Wisej application printing for a translated form.

ParameterTypeDescription
ctrlControlThe form to print; other control types are ignored.

Instance member RemoveMessageActions(handler)

Deprecated memberDeprecated: Deprecated. Use RemoveWindowActions() Removes a delegate from this window's action manager.

ParameterTypeDescription
handlerDelegateThe action delegate to remove.

This obsolete entry point is equivalent to RemoveWindowActions.

Instance member RemoveWindowActions(handler)

Removes a delegate from this window's action manager.

ParameterTypeDescription
handlerDelegateThe action delegate to remove.

Static member SendMessage(ctrl, msg, wParam, lParam)

Dispatches a SAL window action synchronously and returns its result.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
msgInt32The SAL or application-defined message code.
wParamSalNumberThe first message parameter.
lParamSalNumberThe second message parameter.

Returns: SalNumber. The action's return value, or zero if the target is unavailable or disposed.

Static member SendMessageToChildren(ctrl, msg, wParam, lParam)

Dispatches a SAL message to the specified control's children.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
msgInt32The SAL or application-defined message code.
wParamSalNumberThe first message parameter.
lParamSalNumberThe second message parameter.

Returns: Boolean. The result of child-message dispatch; false if the parent is unavailable or disposed.

Static member SendMessageToChildrenInternal(ctrl, msg, wParam, lParam)

Traverses a non-null container and dispatches an action to eligible child controls.

ParameterTypeDescription
ctrlControlThe non-null container; this entry point does not translate it.
msgInt32The action code.
wParamSalNumberThe first action parameter.
lParamSalNumberThe second action parameter.

Returns: Boolean. True after traversal.

Disposed controls and the MDI client panel are skipped. Recursion stops at embedded forms and user controls; MDI child forms are handled separately.

Static member SendValidateMessage()

Requests SAL validation of the focused control with reentrancy protection.

Returns: Int32. The validation result; reentrant calls return Sys.VALIDATE_Ok without dispatching again.

Static member SetCancelButton(ctrl)

Sets a button as its containing form's cancel button.

ParameterTypeDescription
ctrlControlThe button to assign.

Returns: Boolean. True if a compatible button and containing form are available; otherwise, false.

Static member SetChecked(ctrl, value)

Sets a check box or radio button through its Wisej checked-state property.

ParameterTypeDescription
ctrlControlThe target control.
valueSalNumberThe numeric value converted to the checked state.

Returns: Boolean. True for a supported target; otherwise, false.

Static member SetContextMenu(ctrl, menuName, flags)

Creates and assigns a context menu for the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
menuNameStringThe name used to resolve the menu type.
flagsInt32Use Sys.CM_TableCell to target the associated table column; other values target the control.

Returns: Boolean. True if the menu was created; false if the control or menu type is unavailable or menu creation fails.

Static member SetContextMenu(ctrl, menuType, flags)

Creates and assigns a context menu for the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
menuTypeTypeThe type of the menu to create.
flagsInt32Use Sys.CM_TableCell to target the associated table column; other values target the control.

Returns: Boolean. True if the menu was created; false if the control or menu type is unavailable or menu creation fails.

Static member SetCursor(ctrl, cursor, type)

Assigns a cursor to a supported SAL cursor role.

ParameterTypeDescription
ctrlControlThe target control.
cursorCursorThe cursor to assign for the window role.
typeInt32A Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop role.

Returns: Boolean. True for the window role on a resolved control, or a drag/drop role on a SAL window; otherwise, false.

Only the window role changes a displayed cursor. Drag/drop roles are accepted without changing a cursor.

Static member SetCursor(ctrl, cursorId, type)

Assigns a predefined cursor to the requested role.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
cursorIdInt32A supported Sys.CURSOR_* cursor identifier.
typeInt32The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Only the window role changes the displayed cursor. Drag/drop roles are accepted for SAL windows without changing a cursor.

Static member SetCursor(ctrl, fileName, type)

Loads a cursor from a file and assigns it to the requested role.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
fileNameStringThe cursor file path.
typeInt32The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: Boolean. True if loading and assignment succeed; otherwise, false.

Only the window role changes the displayed cursor. Drag/drop roles are accepted for SAL windows without changing a cursor.

Static member SetCursor(ctrl, blob, type)

Requests a cursor from binary data; this web implementation does not support binary cursor loading.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
blobByte[]The binary cursor data.
typeInt32The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: Boolean. Always false.

Static member SetDataLength(ctrl, maxLength)

Sets a SAL edit control's maximum input length.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
maxLengthInt32The character limit; -1 is translated to the control's zero default-limit value.

Returns: Boolean. True if the control implements the SAL editing contract; otherwise, false.

Static member SetDefaultButton(ctrl)

Sets the specified button as the containing form's accept button.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if a compatible button and containing form are available; otherwise, false.

Static member SetFocus(ctrl)

Requests keyboard focus for the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Control. The previously focused control, or null if no previous control exists or the target is ineligible.

Hidden or disabled controls and table columns are ineligible.

Static member SetFont(ctrl, name, size, enhancement)

Creates and assigns a font to the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
nameStringThe font family name.
sizeInt32The font size in points.
enhancementInt32The combined Sys.FONT_Enh* style flags.

Returns: Boolean. True if the font was created and assigned; otherwise, false.

Static member SetFormat(ctrl, format)

Assigns a format picture, translating encoded SAL numeric format characters when present.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
formatStringThe format picture, including an encoded SAL numeric picture if required.

Returns: Boolean. True if the control implements SAL editing; otherwise, false.

Encoded group, decimal, and currency markers are translated with invariant-culture symbols.

Static member SetFormatCode(ctrl, format)

Applies a SAL format code through a format picture, character casing, or password setting.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
formatInt32The Sys.FMT_Format_* code to apply.

Returns: Boolean. True when the format is accepted; false for an unsupported code or target.

Picture format is accepted without replacing the existing picture.

Static member SetFormattedText(ctrl, text, applyFormat)

Assigns text through a SAL edit control's value property.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
textStringThe value text to assign.
applyFormatBooleanRetained for compatibility and ignored.

Returns: Boolean. True if the control implements SAL editing; otherwise, false.

Static member SetHintText(ctrl, text)

Assigns watermark text to a text box or combo box.

ParameterTypeDescription
ctrlControlThe target control.
textStringThe watermark text.

Returns: Boolean. True for a supported target; otherwise, false.

Static member SetInputMask(ctrl, mask)

Assigns the edit mask of a SAL edit control.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
maskStringThe mask to assign.

Returns: Boolean. True if the control implements SAL editing; otherwise, false.

Static member SetLabel(ctrl, label)

Associates a label with a control hosted by a SAL form.

ParameterTypeDescription
ctrlControlThe control to associate with the label.
labelControlThe label control to associate.

Does nothing when the control cannot be resolved or its form does not implement SAL form behavior.

Static member SetLabelText(ctrl, text)

Assigns the text of the specified control's associated label.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
textStringThe label text to display.

Returns: Boolean. True if an associated label was found and updated; otherwise, false.

Static member SetListSelectedIndex(ctrl, index)

Sets the selection index using SAL single- or multiple-selection rules.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The zero-based item index. In multiple-selection mode, -1 selects all items and another out-of-range index clears them. In single-selection mode, -1 clears selection.

Returns: Boolean. True after accepted multiple-selection operations; for single-selection controls, true only when an item is selected. Clearing a single selection returns false.

Static member SetListSelectedItems(ctrl, index, select)

Changes selection in a list configured for multiple selection.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
indexInt32The item index, or -1 to affect every item.
selectBooleanTrue to select; false to deselect.

Returns: Boolean. True when the supported multiple-selection path accepts the request; otherwise, false.

Static member SetListSelectedText(ctrl, startIndex, text)

Selects an item found by text search, wrapping to the beginning when necessary.

ParameterTypeDescription
ctrlControlThe list or combo-box control to access.
startIndexInt32The starting index passed to the list search; -1 starts from the initial position.
textStringThe nonempty text to locate.

Returns: Int32. The matched item index, or -1 when the input is empty or no match is found.

If no match exists and the control has no current selection, its text or selection is cleared. An existing selection is preserved when no match exists.

Static member SetLocation(ctrl, pos)

Sets a control's location using form units.

ParameterTypeDescription
ctrlControlThe control to position.
posPointFThe new horizontal and vertical coordinates in form units.

Returns: Boolean. True if the control was resolved and positioned; otherwise, false.

For forms, this also sets manual startup positioning.

Static member SetModified(ctrl, modified)

Sets the specified control's SAL modification flag.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
modifiedBooleanTrue to mark the value modified; false to clear the flag.

Returns: Boolean. True if the translated control supports SAL values; otherwise, false.

For editable SAL controls, this also clears the validation flag.

Static member SetProfile(ctrl, profile)

Assigns a formatting culture to a SAL edit control.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
profileInt32A SAL country/default profile or a locale identifier. The program profile creates a writable clone of the current SAL culture.

Returns: Boolean. False if the control cannot be resolved; otherwise, true, including resolved controls without SAL editing support.

Static member SetProfileParameter(ctrl, paramCode, paramValue)

Changes a numeric parameter in a SAL edit control's writable formatting culture.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
paramCodeInt32The supported Sys.FMT_Parm_* parameter code.
paramValueSalNumberThe new parameter value.

Returns: Boolean. True when the parameter code is accepted; false for an unsupported code, noneditable target, or missing/read-only culture.

The current value is reassigned after updating the culture. Date-type, leading-zero, and time-leading-zero settings are accepted without changing those settings.

Static member SetProfileParameter(ctrl, paramCode, paramValue)

Changes a text parameter in a SAL edit control's writable formatting culture.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
paramCodeInt32The supported Sys.FMT_Parm_* parameter code.
paramValueSalStringThe new parameter value.

Returns: Boolean. True when the parameter code is accepted; false for an unsupported code, noneditable target, or missing/read-only culture.

The current value is reassigned after updating the culture.

Static member SetProperty(ctrl, name, value)

Adds or replaces a named property on a SAL window.

ParameterTypeDescription
ctrlControlThe control whose SAL named-property collection is updated.
nameStringThe case-sensitive property name.
valueStringThe value to store, including null.

Returns: Boolean. True if the translated control implements the SAL window contract; otherwise, false.

Static member SetScrollBarPosition(ctrl, pos)

Sets a translated trackbar's value after clamping it to the current range.

ParameterTypeDescription
ctrlControlThe target control, which must resolve to a Wisej TrackBar.
posInt32The requested position.

Returns: Boolean. True if the target is a trackbar; otherwise, false.

Static member SetScrollBarRange(ctrl, min, max, line, page)

Sets a scrollbar's range and increments.

ParameterTypeDescription
ctrlControlThe scrollbar control.
minInt32The new minimum.
maxInt32The new maximum, assigned through the SAL override when available.
lineInt32The small-change increment.
pageInt32The large-change increment.

Returns: Boolean. True if the translated target is a scrollbar; otherwise, false.

Static member SetSize(ctrl, size)

Sets a control's dimensions using form units.

ParameterTypeDescription
ctrlControlThe control to resize.
sizeSizeFThe new width and height in form units.

Returns: Boolean. True if the control was resolved and resized; otherwise, false.

Static member SetStatusBarText(ctrl, text)

Updates an associated form's status-bar text when a status bar can be found.

ParameterTypeDescription
ctrlControlThe control used to locate the form.
textStringThe status text to assign.

Returns: Boolean. Always true, including when no status bar exists.

MDI children use the MDI parent; dialog boxes can fall back through their owners.

Static member SetStatusBarText(menu, text)

Updates status text through the form that owns a menu's main menu.

ParameterTypeDescription
menuMenuThe menu used to locate the main menu and form.
textStringThe status text to assign.

Returns: Boolean. False if the menu has no main menu; otherwise, the control-based status update result.

Static member SetText(ctrl, text)

Assigns the control's text.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
textStringThe text to display.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member SetTimer(ctrl, id, millisec)

Starts or restarts a timer that sends SAL timer actions to the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
idInt32The timer identifier sent in the first parameter of each Sys.SAM_Timer action.
millisecInt32The interval between ticks, in milliseconds.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member SetWindowColor(ctrl, colorIndex, nColor)

Assigns a window or table-cell color.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.
colorIndexInt32The Sys.COLOR_Index* component to change.
nColorInt32The SAL color value to translate and assign.

Returns: Boolean. True for a supported color index and resolved control; otherwise, false.

Cell colors apply only to table columns. Window colors on table windows also update their grid styles.

Instance member ShouldDispatch(code)

Tests whether an action should be sent to this window's handlers.

ParameterTypeDescription
codeInt32The window-action or WinSDK message code.

Returns: Boolean. True when handlers exist, the application is running, the message is not filtered out, and this SAL window is not disposed.

Static member ShowStatusBar(ctrl, visible)

Changes the visibility of a form's status bar.

ParameterTypeDescription
ctrlControlThe form that owns the accessory.
visibleBooleanTrue to show the accessory; false to hide it.

Returns: Boolean. True if the translated target is a form with the requested accessory; otherwise, false.

Static member ShowToolBar(ctrl, visible)

Changes the visibility of a form's toolbar.

ParameterTypeDescription
ctrlControlThe form that owns the accessory.
visibleBooleanTrue to show the accessory; false to hide it.

Returns: Boolean. True if the translated target is a form with the requested accessory; otherwise, false.

Static member ShowWindow(ctrl)

Shows the specified control or table column.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. The visibility state before the operation, or false if the control cannot be resolved.

Static member ShowWindowAndLabel(ctrl)

Shows the specified control and its associated label.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. The control's visibility before the operation, or false if it cannot be resolved.

Static member TrackPopupMenu(ctrl, menuName, flags, pos, callback)

Creates and displays a popup menu and disposes it after it closes.

ParameterTypeDescription
ctrlControlThe control that owns the popup.
menuNameStringThe name used to resolve the menu type.
flagsInt32Popup flags for right alignment and cursor coordinates. Center alignment and context-menu flags are not supported.
posPointThe screen position in pixels; cursor-coordinate flags override the corresponding coordinate.
callback optionalAction<ContextMenu>An optional callback invoked after the popup closes, before it is disposed.

Returns: Boolean. True if the popup was created and shown; otherwise, false.

Static member TrackPopupMenu(ctrl, menuType, flags, pos, callback)

Creates and displays a popup menu and disposes it after it closes.

ParameterTypeDescription
ctrlControlThe control that owns the popup.
menuTypeTypeThe menu type to instantiate.
flagsInt32Popup flags for right alignment and cursor coordinates. Center alignment and context-menu flags are not supported.
posPointThe screen position in pixels; cursor-coordinate flags override the corresponding coordinate.
callback optionalAction<ContextMenu>An optional callback invoked after the popup closes, before it is disposed.

Returns: Boolean. True if the popup was created and shown; otherwise, false.

Static member TranslateColor(color)

Converts a drawing color to a SAL color constant or Win32 color value.

ParameterTypeDescription
colorColorThe color to translate.

Returns: Int32. A matching SAL system/default/transparency constant when available; otherwise, the Win32 color value.

Static member TranslateControl(ctrl)

Resolves a wrapper or secondary-base control to the visual instance used by SAL operations.

ParameterTypeDescription
ctrlControlThe control to translate, or null.

Returns: Control. The translated control, or null.

Client-area accessories, wrapped data grids, and embedded table windows are mapped to their containing SAL control before derived-instance resolution.

Static member TranslateProfile(profile)

Resolves a SAL formatting profile to a culture.

ParameterTypeDescription
profileInt32A SAL country/default profile constant or a locale identifier.

Returns: CultureInfo. The mapped cached culture, or the current SAL culture for the default profile.

Static member TranslateSalColor(nColor)

Converts a SAL color constant or Win32 color value to a drawing color.

ParameterTypeDescription
nColorSalNumberThe SAL color value.

Returns: Color. The mapped color; SAL null and COLOR_Default produce Color.Empty, and COLOR_None produces transparency.

Static member Undo()

Dispatches the undo clipboard command to the focused table or column.

Returns: Boolean. The table or column command result; false for ordinary controls or an unavailable target.

Static member Update(ctrl)

Requests an update of the specified control.

ParameterTypeDescription
ctrlControlThe control on which to perform the SAL operation.

Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Static member UpdateMainMenu(form)

Refreshes SAL items in a form's merged or regular main menu.

ParameterTypeDescription
formFormThe form whose menu is refreshed.

Returns: Boolean. True if a menu is found; otherwise, false.

For an MDI container with an active child, the child's menu is used. Refresh occurs within a root SAL context.

Static member Validate(ctrl, showErrorMessage)

Validates a SAL edit control and applies its format after successful validation.

ParameterTypeDescription
ctrlControlThe control whose SAL editing behavior is accessed.
showErrorMessageBooleanTrue to display the SAL invalid-data message when validation fails.

Returns: Boolean. True after successful validation and formatting; otherwise, false.

Static member WaitCursor(wait)

Deprecated memberDeprecated: Sal.WaitCursor is not supported. Retains the obsolete wait-cursor API without changing any cursor.

ParameterTypeDescription
waitBooleanIgnored by this web implementation.

Returns: Boolean. Always true.