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.
- C#
- VB.NET
public class SalWindow
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
SalWindow(salWnd)
Creates a SAL implementation and action manager for a window.
| Name | Type | Description |
|---|---|---|
| salWnd | ISalWindow | The SAL window to which this implementation belongs. |
Properties
DesignMode
Boolean: Gets whether Wisej is outside application runtime mode.
DragLocation
Point: Gets the recorded drag-start location in source-control client coordinates.
DragSource
Control: Gets the control recorded as the current SAL drag source.
DropData
IDataObject: Gets the data object recorded for the current SAL drop operation.
DropDisabled
Boolean: Gets or sets the SAL flag that disables acceptance of the current drop.
DropLocation
Point: Gets the recorded drop location in target-control client coordinates.
DropTarget
Control: Gets the control recorded as the current SAL drop target.
KeepMask
Boolean: Gets or sets whether SAL text access retains input-mask characters.
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.
NamedProperties
SalNamedProperties: Gets the named-property collection, creating an empty collection on first access.
Methods
AddListItem(ctrl, text)
Adds a text item to a supported list control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| text | String | The item text to add. |
Returns: Int32. The resulting item index, or Sys.LB_Err for an unsupported or unavailable control.
AddMessageActions(handler)
Deprecated: Deprecated. Use AddWindowActions()
Registers a delegate with this window's action manager.
| Parameter | Type | Description |
|---|---|---|
| handler | Delegate | The action delegate to register. |
This obsolete entry point is equivalent to AddWindowActions.
AddMessageActions(target)
Deprecated: Deprecated. Use AddWindowActions().
Adds another window's registered action handlers to this window.
| Parameter | Type | Description |
|---|---|---|
| target | ISalWindow | The SAL window whose handlers are copied into this instance. |
This obsolete entry point delegates to AddWindowActions.
AddWindowActions(handler)
Registers a delegate with this window's action manager.
| Parameter | Type | Description |
|---|---|---|
| handler | Delegate | The action delegate to register. |
AddWindowActions(target)
Adds another window's registered action handlers to this window.
| Parameter | Type | Description |
|---|---|---|
| target | ISalWindow | The SAL window whose handlers are copied into this instance. |
AddWinSDKCriticalEvents(events)
Registers browser keyboard events when WinSDK keyboard messages require dispatch.
| Parameter | Type | Description |
|---|---|---|
| events | WiredEvents | The mutable browser-event registration collection. |
Adds keydown and keyup when WM_KEYDOWN, WM_CHAR, or WM_KEYUP passes the dispatch filter.
BringToTop(ctrl)
Brings the specified control to the front, or activates it when it is a top-level or MDI form.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the translated control exists and is not disposed; otherwise, false.
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.
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.
CanPaste()
Checks whether SAL permits pasting into the focused control.
Returns: Boolean. The focused control's SAL paste-availability result.
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.
Center(ctrl)
Centers the specified window within its parent, owner, or available screen area.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
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.
Clear(ctrl)
Clears editable text or selection according to the control type.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
ClearCursor(ctrl, type)
Restores the default cursor for the requested role.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| type | Int32 | The 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.
ClearList(ctrl)
Removes all items from a supported list control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
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.
CopyProfile(ctrl, profile)
Copies number and date/time format settings into a control's writable culture.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| profile | Int32 | The 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.
CopyString(text)
Writes a string to the clipboard as Unicode text.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text to place on the clipboard. |
Clipboard exceptions are traced and suppressed.
CreateFont(name, size, enhancement)
Creates a point-sized font from a family name and SAL enhancement flags.
| Parameter | Type | Description |
|---|---|---|
| name | String | The font family name. |
| size | Single | The size in points; nonpositive values use 8 points. |
| enhancement | Int32 | The combined bold, italic, underline, and strikeout FONT_Enh flags. |
Returns: Font. The created font, or null when the name is null or empty.
CreateWindow(type, owner, args)
Creates and shows a modeless form of the specified type.
| Parameter | Type | Description |
|---|---|---|
| type | Type | The form type to instantiate. |
| owner | Control | The owning control or form. |
| args | Object[] | 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.
CreateWindow(typeName, parent, args)
Resolves a form type relative to the calling assembly, then creates and shows it.
| Parameter | Type | Description |
|---|---|---|
| typeName | String | The application form type name. |
| parent | Control | The owning control or form. |
| args | Object[] | Arguments used by the form creation path. |
Returns: Control. The created form, or null if it was disposed during creation.
CreateWindow(type, parent, left, top, width, height, flags, args)
Creates a SAL form with child-window, visibility, and border options.
| Parameter | Type | Description |
|---|---|---|
| type | Type | The SAL form type to create. |
| parent | Control | The parent or owner; required for child-form creation. |
| left | Single | The child form's horizontal position in form units. |
| top | Single | The child form's vertical position in form units. |
| width | Single | The child form's width in form units. |
| height | Single | The child form's height in form units. |
| flags | Int32 | The combined CREATE_AsChild, CREATE_Hidden, and CREATE_Border options. |
| args | Object[] | 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.
CreateWindow(typeName, parent, left, top, width, height, flags)
Resolves and creates a SAL form with child-window, visibility, and border options.
| Parameter | Type | Description |
|---|---|---|
| typeName | String | The form type name resolved relative to the calling assembly. |
| parent | Control | The parent or owner; required for child-form creation. |
| left | Single | The child form's horizontal position in form units. |
| top | Single | The child form's vertical position in form units. |
| width | Single | The child form's width in form units. |
| height | Single | The child form's height in form units. |
| flags | Int32 | The 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.
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.
DeleteListItem(ctrl, index)
Removes an item from a supported list control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The zero-based item index. |
Returns: Int32. The remaining item count, or Sys.LB_Err for an invalid index or unsupported control.
Destroy(ctrl)
Closes the specified window when it is a form, or disposes the control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
DisableWindow(ctrl)
Disables input to the specified control, or clears editability for a table column.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
DisableWindowAndLabel(ctrl)
Disables input to the specified control and disables its associated label.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
DragAcceptFiles(ctrl, accept)
Changes whether a control allows drops.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The drop-target control. |
| accept | Boolean | The new value of the control's AllowDrop property. |
Returns: Boolean. True if the control is resolved; otherwise, false.
DragDropStart(data)
Initializes SAL drag state, dispatches SAM_DragStart, and starts a drag operation unless canceled.
| Parameter | Type | Description |
|---|---|---|
| data | Object | The 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.
DragDropStop()
Clears the current SAL drag source to stop or cancel drag processing.
Returns: Boolean. True if a drag source was active; otherwise, false.
EnableWindow(ctrl)
Enables input to the specified control, or enables editing for a table column.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
EnableWindowAndLabel(ctrl)
Enables input to the specified control and enables its associated label.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
EndDialog(ctrl, value)
Sets a dialog result and requests closure of a modal or modeless dialog.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The dialog form to close. |
| value | Int32 | The 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.
FindChild(ctrl, name)
Searches the specified window for a child control by name.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| name | String | The child control name to locate. |
Returns: Control. The matching child control, or null if no child is found.
FindChild(ctrl, type)
Searches a control's child hierarchy for a control of the specified type.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The parent control in which to search. |
| type | Type | The requested child type. |
Returns: Control. The matching control, or null if the parent cannot be resolved or no child matches.
FindControl(ctrl, name)
Reads a named application member and returns its value as a control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose member is inspected. |
| name | String | The member name. |
Returns: Control. The member value if it is a control; otherwise, null.
Throws:
- MissingMemberException The control is unavailable or the member does not exist.
FindMember(ctrl, name)
Finds an application member on a control and exposes read/write access through a reference object.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose translated runtime type is inspected. |
| name | String | The member name to resolve. |
Returns: ReferenceInfo. A reference to the resolved member.
Throws:
- MissingMemberException The control is unavailable or the member does not exist.
FireWindowActions(ctrl, msgCode, wParam, lParam)
Dispatches a SAL action through the target's derived control instance.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control. |
| msgCode | Int32 | The SAL or application-defined action code. |
| wParam | SalNumber | The first action parameter. |
| lParam | SalNumber | The 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.
FireWindowActionsToChildren(ctrl, msg, wParam, lParam)
Dispatches a SAL message to the specified control's children.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| msg | Int32 | The SAL or application-defined message code. |
| wParam | SalNumber | The first message parameter. |
| lParam | SalNumber | The second message parameter. |
Returns: Boolean. The result of child-message dispatch; false if the parent is unavailable or disposed.
FireWinSDKEvent(e)
Translates supported browser mouse, keyboard, and size events into WinSDK window actions.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | The 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.
FormUnitsToPixels(ctrl, units, vertical)
Converts a length in form units to pixels using the specified control's form metrics.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| units | Single | The length in form units. |
| vertical | Boolean | True for a vertical measurement; false for a horizontal measurement. |
Returns: Int32. The converted pixel length.
FromHandle(handle, type)
Resolves a SAL window handle and casts the translated control through SAL inheritance rules.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The window handle to resolve. |
| type | Type | The required application or framework type. |
Returns: Object. The cast object, or null when the handle does not resolve to a control.
Throws:
- InvalidCastException The translated control cannot be cast to the requested type.
GetCancelButton(ctrl)
Gets a form's cancel button.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form to inspect. |
Returns: Control. The button as a control, or null when the target is not a form or has no compatible button.
GetClassName(ctrl)
Gets the application class name associated with the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetClientArea(form)
Finds a form's SAL client area accessory.
| Parameter | Type | Description |
|---|---|---|
| form | Control | The form or container to search. |
Returns: SalFormClientArea. The matching SAL accessory, or null when none is found.
GetControlName(ctrl)
Gets the specified control's name.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: String. The control name, or an empty string when the control cannot be resolved.
GetControlName(ctrl, sName)
Copies the specified control's name to the supplied variable.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| sName | SalString | Receives the control name when the operation succeeds. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
GetControlType(ctrl)
Gets the SAL window type of the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Int32. The SAL Sys.TYPE_* code for the translated control.
GetDataLength(ctrl)
Gets a SAL edit control's input-length limit.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetDataType(ctrl)
Gets the SAL data type represented by the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetDefaultButton(ctrl)
Gets a form's accept button.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form to inspect. |
Returns: Control. The button as a control, or null when the target is not a form or has no compatible button.
GetFirstChild(parent, typeMask)
Finds the first child matching a SAL window-type mask.
| Parameter | Type | Description |
|---|---|---|
| parent | Control | The control on which to perform the SAL operation. |
| typeMask | Int32 | The 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.
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.
GetFont(ctrl, sName, nSize, nEnhancement)
Reads the control font's family, point size, and style flags.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| sName | SalString | Receives the font family name. |
| nSize | SalNumber | Receives the size in points. |
| nEnhancement | SalNumber | Receives the combined Sys.FONT_Enh* style flags. |
Returns: Boolean. True if a font was available; otherwise, false.
GetFont(font, name, size, enhancement)
Reads a font's family, point size, and SAL style flags.
| Parameter | Type | Description |
|---|---|---|
| font | Font | The font to inspect. |
| name | String | Receives the family name. |
| size | Single | Receives the point size. |
| enhancement | Int32 | Receives the combined bold, italic, strikeout, and underline Sys.FONT_Enh* flags. |
Returns: Boolean. False if the font is null; otherwise, true.
GetFontNames()
Enumerates font-family names installed on the application server.
Returns: String[]. An array of installed family names.
GetFormat(ctrl)
Gets the format picture of a SAL edit control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
Returns: String. The format picture, or null for a control without SAL editing support.
GetFormatCode(ctrl)
Classifies a control's format picture, character casing, or password display as a SAL format code.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
Returns: Int32. A Sys.FMT_Format_* code; unformatted when no supported format or presentation setting is found.
GetFormattedText(ctrl, format)
Converts an editable control's value to text, optionally using its SAL format.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| format | Boolean | True 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.
GetHintText(ctrl)
Gets the watermark text of a text box or combo box.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose hint is queried. |
Returns: String. The watermark, or null for unsupported controls.
GetInputMask(ctrl)
Gets the input mask of a SAL edit control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
Returns: String. The edit mask, or null for a control without SAL editing support.
GetLabel(ctrl)
Gets the label associated with a control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetLabelText(ctrl)
Gets a control's own label text or the text of its associated label.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetLabelText(ctrl, maxLen)
Gets the specified control's associated label text.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| maxLen | Int32 | The 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.
GetLabelText(ctrl, sText, maxLen)
Copies the associated label text to a supplied variable.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| sText | SalString | Receives the label text when it can be read. |
| maxLen | Int32 | The maximum number of leading characters to copy. |
Returns: SalNumber. The number of characters copied, or zero if no label text is available.
GetListItemsCount(ctrl)
Gets the number of items in a supported list control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
Returns: Int32. The item count, or Sys.LB_Err for an unsupported or unavailable control.
GetListItemState(ctrl, index)
Tests an item's selection state.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The 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.
GetListItemText(ctrl, index)
Gets an item's string representation.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The zero-based item index. |
Returns: String. The converted item text, or null when the item or supported control is unavailable.
GetListItemText(ctrl, index, text)
Copies an item's string representation to a SAL string.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The zero-based item index. |
| text | SalString | Receives the item text on success; otherwise remains unchanged. |
Returns: Int32. The copied character count, or Sys.LB_Err when item text is unavailable.
GetListItemTextLength(ctrl, index)
Gets the character count of an item's string representation.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The zero-based item index. |
Returns: Int32. The character count, or Sys.LB_Err when item text is unavailable.
GetListSelectedFile(ctrl, fileName)
Decodes a selected entry created by file-list population.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The SAL file-list control. |
| fileName | SalString | Receives 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.
GetListSelectedFile(ctrl)
Gets the decoded name of a selected file-list entry.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The SAL file-list control. |
Returns: String. The file name, directory with trailing backslash, or drive designation; an empty string when no selection is available.
GetListSelectedIndex(ctrl)
Gets a supported list control's current selection index.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetListSelectedItems(ctrl, selectedArray)
Copies available selected item indices into a dynamic SAL array.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| selectedArray | SalArray<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.
GetListSelectedItemsCount(ctrl)
Gets the number of selected items from a SAL multiple-selection list.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetLocation(ctrl)
Gets a control's location expressed in form units.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose location is read. |
Returns: PointF. The location in form units, or an empty point when the control cannot be resolved.
GetMdiClient(form)
Finds the MDI client area of a container form.
| Parameter | Type | Description |
|---|---|---|
| form | Form | The MDI container to inspect. |
Returns: MdiClient. The MDI client, or null for an absent or non-MDI form.
GetMessageName(msg)
Gets the runtime's symbolic name for a recognized WinSDK message.
| Parameter | Type | Description |
|---|---|---|
| msg | Int32 | The Windows message code. |
Returns: String. The stored message name, or an empty string for an unrecognized code.
GetNextChild(ctrl, typeMask)
Finds the next sibling matching a SAL window-type mask.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| typeMask | Int32 | The SAL window types to include; zero matches no controls. |
Returns: Control. The next matching control, or null if no control matches.
GetParent(ctrl)
Gets the SAL parent form, owner, or table container for the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetProfile(ctrl)
Maps a control's formatting culture to a SAL profile identifier.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetProfileParameter(ctrl, paramCode, paramValue)
Reads a numeric parameter from the control's formatting culture.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| paramCode | Int32 | The supported Sys.FMT_Parm_* parameter code. |
| paramValue | SalNumber | Receives 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.
GetProfileParameter(ctrl, paramCode, paramValue)
Reads a text parameter from the control's formatting culture.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| paramCode | Int32 | The supported Sys.FMT_Parm_* parameter code. |
| paramValue | SalString | Receives 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.
GetProperty(ctrl, name)
Gets the value of a SAL named property.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| name | String | The property name. |
Returns: String. The property value, or null if the property or SAL window is unavailable.
GetProperty(ctrl, name, sValue)
Reads a SAL named property into a supplied variable.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| name | String | The property name. |
| sValue | SalString | Receives the value only when the property is found. |
Returns: Boolean. True if a non-null property value was found; otherwise, false.
GetSalMessageName(msg)
Gets the symbolic name of a recognized SAL action.
| Parameter | Type | Description |
|---|---|---|
| msg | Int32 | The SAL action code. |
Returns: String. The SAM name for recognized codes, or the numeric code converted to text.
GetScrollBarPosition(ctrl)
Reads the value of a translated trackbar control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control, which must resolve to a Wisej TrackBar. |
Returns: Int32. The trackbar value, or zero for other control types.
GetScrollBarRange(ctrl, nMin, nMax, nLine, nPage)
Reads a scrollbar's range and increments.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The scrollbar control. |
| nMin | SalNumber | Receives the minimum. |
| nMax | SalNumber | Receives the maximum, including SAL scrollbar adjustments. |
| nLine | SalNumber | Receives the small-change increment. |
| nPage | SalNumber | Receives the large-change increment. |
Returns: Boolean. False for a null input; otherwise, true. A non-scrollbar target produces zero for all outputs.
GetSize(ctrl)
Gets a control's dimensions expressed in form units.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose size is read. |
Returns: SizeF. The size in form units, or an empty size when the control cannot be resolved.
GetSortedControls(parent)
Returns child controls in the runtime's traversal order.
| Parameter | Type | Description |
|---|---|---|
| parent | Control | The non-null parent control. |
Returns: Control[]. A child-control array sorted by tab index, or the specialized table-window ordering for table containers.
GetState(ctrl)
Gets the visibility and form-state classification of the specified window.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Int32. A Sys.Window_* state code; visible non-form controls report Sys.Window_Normal.
GetStatusBar(form)
Finds a form's SAL status bar accessory.
| Parameter | Type | Description |
|---|---|---|
| form | Control | The form or container to search. |
Returns: SalFormStatusBar. The matching SAL accessory, or null when none is found.
GetStatusBarText(ctrl)
Gets the status text of the top-level form associated with a control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
GetSysColor(colorIndex)
Translates a system-color index to a Win32 color value.
| Parameter | Type | Description |
|---|---|---|
| colorIndex | Int32 | A SAL system-color constant or system-color index. |
Returns: Int32. The translated Win32 color value.
GetText(ctrl)
Gets a control's text using SAL mask handling.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose text is read. |
Returns: String. The text returned by SAL mask processing, or null if the control cannot be resolved.
GetText(ctrl, text, maxLen)
Copies the specified control's displayed text or long-string value to a SAL string.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| text | SalString | Receives the retrieved text. |
| maxLen | Int32 | The 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.
GetText(ctrl, maxLen)
Gets the specified control's displayed text or long-string value.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| maxLen | Int32 | The 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.
GetTextUnmasked(ctrl)
Gets a control's text with SAL input-mask processing removed.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
Returns: SalString. The unmasked SAL string, or a SAL null string when retrieval fails.
GetToolBar(form)
Finds a form's SAL toolbar accessory.
| Parameter | Type | Description |
|---|---|---|
| form | Control | The form or container to search. |
Returns: SalFormToolBar. The matching SAL accessory, or null when none is found.
GetWindowColor(ctrl, colorIndex)
Reads a window or cell color as a Win32 color value.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| colorIndex | Int32 | The Sys.COLOR_Index* color component to read. |
Returns: Int32. The color encoded as a Win32 color value, or zero if the control is unavailable.
HasAccessories(ctrl)
Tests whether a form directly contains any SAL accessory controls.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form to inspect. |
Returns: Boolean. True if a direct child implements the SAL accessory contract; false for other controls or forms without accessories.
HideWindow(ctrl)
Hides the specified control or table column.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. The visibility state before the operation, or false if the control cannot be resolved.
HideWindowAndLabel(ctrl)
Hides the specified control and its associated label.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. The control's visibility before the operation, or false if it cannot be resolved.
InsertListItem(ctrl, index, text)
Inserts a text item into a supported list control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The insertion position from zero through the item count, or -1 to append. |
| text | String | The item text to insert. |
Returns: Int32. The insertion result from the list, or Sys.LB_Err for an invalid position or unsupported control.
Invalidate(ctrl)
Invalidates the specified control and its child controls for repainting.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
IsChecked(ctrl)
Reads the checked state of a check box or radio button.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control. |
Returns: Boolean. The checked state, or false for other control types.
IsDerivedFrom(ctrl, type)
Tests the specified control's runtime type against an application base type.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| type | Type | The type to test, including the framework's emulated inheritance relationships. |
Returns: Boolean. True if the runtime type derives from the requested type; otherwise, false.
IsEmpty(ctrl)
Tests whether an editable control has no unmasked text.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
IsEnabled(ctrl)
Determines whether the specified control accepts input.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
IsKeyboardMessage(msg)
Tests whether a message falls in the WinSDK keyboard-message interval.
| Parameter | Type | Description |
|---|---|---|
| msg | Int32 | The message code. |
Returns: Boolean. True from WM_KEYFIRST through WM_KEYLAST, inclusive; otherwise, false.
IsModified(ctrl)
Reads the specified control's SAL modification flag.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the control reports a modified value; otherwise, false.
IsMouseMessage(msg)
Tests whether a message falls in the WinSDK mouse-message interval.
| Parameter | Type | Description |
|---|---|---|
| msg | Int32 | The message code. |
Returns: Boolean. True from WM_MOUSEFIRST through WM_MOUSELAST, inclusive; otherwise, false.
IsSalMessage(msg)
Tests whether a message code appears in the runtime's recognized SAL-action set.
| Parameter | Type | Description |
|---|---|---|
| msg | Int32 | The message code to classify. |
Returns: Boolean. True for an explicitly recognized SAL action; otherwise, false.
IsScrollBarVisible(control, bars)
Checks scrollbar visibility on an initialized scrollable control.
| Parameter | Type | Description |
|---|---|---|
| control | Control | The non-null control to inspect. |
| bars | ScrollBars | The 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.
IsValid(ctrl)
Validates the current value against a SAL edit control's data type.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
IsValidDateTime(ctrl)
Tests whether the control's masked text is a valid date/time for its format and culture.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
Returns: Boolean. True if the editable control's text passes SAL date/time validation; otherwise, false.
IsValidDecimal(ctrl, precision, scale)
Tests masked control text against a decimal precision and scale.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| precision | Int32 | The allowed decimal precision. |
| scale | Int32 | The 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.
IsValidEditMask(mask)
Checks the minimal SAL edit-mask syntax rules.
| Parameter | Type | Description |
|---|---|---|
| mask | String | The 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.
IsValidFormat(format, code)
Tests a numeric or date/time format by formatting and parsing a sample value.
| Parameter | Type | Description |
|---|---|---|
| format | String | The format string to test. |
| code | Int32 | Use 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.
IsValidInteger(ctrl)
Tests whether the control's masked text is a valid SAL integer.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
Returns: Boolean. True if the editable text passes integer validation using the control's format; otherwise, false.
IsValidNumber(ctrl)
Tests whether the control's text without its mask is a valid SAL number.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
IsVisible(ctrl)
Determines whether the specified control is visible.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
KillTimer(ctrl, id)
Stops an existing timer owned by the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| id | Int32 | The 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.
ListGetMultiSelect(ctrl)
Gets selected indices through the SAL list-selection compatibility path.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
MessageBox(owner, text, title, flags, callback, allowHtml)
Displays a Wisej message box using SAL button, icon, and default-button flags.
| Parameter | Type | Description |
|---|---|---|
| owner | Control | The control used to locate the owner form and active MDI child. |
| text | String | The message body. |
| title | String | The dialog title. |
| flags | Int32 | The combined button, icon, and default-button flags. |
| callback | Action<Int32> | An optional callback receiving the result after the message box closes. |
| allowHtml | Boolean | True 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.
ModalDialog(type, owner, args)
Creates and shows a SAL modal dialog.
| Parameter | Type | Description |
|---|---|---|
| type | Type | The SAL dialog type; MDI and form-table-window subclasses are rejected. |
| owner | Control | The dialog owner. |
| args | Object[] | Arguments used by the dialog creation path. |
Returns: Int32. The dialog's SAL return value.
ModalDialog(type, owner, callback, args)
Creates a SalForm dialog and invokes a callback when it closes.
| Parameter | Type | Description |
|---|---|---|
| type | Type | The SAL dialog type; MDI and form-table-window subclasses are rejected. |
| owner | Control | The dialog owner. |
| callback | Action<Int32> | The callback receiving the dialog return value. |
| args | Object[] | Arguments used by the dialog creation path. |
ModalDialog(typeName, owner, args)
Resolves a dialog type relative to the calling assembly and shows it modally.
| Parameter | Type | Description |
|---|---|---|
| typeName | String | The application dialog type name. |
| owner | Control | The dialog owner. |
| args | Object[] | Arguments used by the dialog creation path. |
Returns: Int32. The dialog's SAL return value.
ModalDialogAsync(type, owner, args)
Creates and shows a SalForm dialog asynchronously.
| Parameter | Type | Description |
|---|---|---|
| type | Type | The SAL dialog type; MDI and form-table-window subclasses are rejected. |
| owner | Control | The dialog owner. |
| args | Object[] | Arguments used by the dialog creation path. |
Returns: Task<Int32>. A task that completes with the dialog return value.
Move(ctrl, offset)
Moves a control relative to its current location using form-unit offsets.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control to move. |
| offset | PointF | The horizontal and vertical offsets in form units. |
Returns: Boolean. True if the control was resolved and moved; otherwise, false.
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.
PasteString(text)
Reads Unicode text from the clipboard.
| Parameter | Type | Description |
|---|---|---|
| text | String | Receives the clipboard text on success; remains unchanged when no compatible text is available. |
Returns: Boolean. True if Unicode text was obtained; otherwise, false.
PixelsToFormUnits(ctrl, pixels, vertical)
Converts a pixel length to form units using the specified control's form metrics.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| pixels | Int32 | The pixel length to convert. |
| vertical | Boolean | True for a vertical measurement; false for a horizontal measurement. |
Returns: Single. The converted length in form units.
PopulateList(ctrl, hSql, sql)
Executes a query and populates a list with its result rows.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target list control. |
| hSql | SalSqlHandle | The connected SQL handle used to execute and read the query. |
| sql | String | The 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.
PopulateList(ctrl, hSql, sql, errorHandler)
Populates a list from a query under a temporary SQL-error handler.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target list control. |
| hSql | SalSqlHandle | The connected SQL handle used to execute and read the query. |
| sql | String | The statement to prepare, or an empty value to execute the handle's previously prepared statement. |
| errorHandler | WhenSqlErrorHandler | The 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.
PopulateListFiles(ctrl, ctrlPath, pathName, attributes)
Replaces a SAL list with file, directory, and drive entries from a server-side path.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control implementing the SAL list contract. |
| ctrlPath | Control | An optional control whose text receives the resolved directory. |
| pathName | SalString | On entry, the directory or wildcard specification; on success, receives the wildcard portion. |
| attributes | Int32 | The 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-].
PostMessage(ctrl, msg, wParam, lParam)
Queues a SAL window action for later dispatch on the application context.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| msg | Int32 | The SAL or application-defined message code. |
| wParam | IntPtr | The first message parameter. |
| lParam | IntPtr | The second message parameter. |
Returns: Boolean. True if the action was queued; false if the control is unavailable or disposed.
PreviewForm(ctrl)
Invokes Wisej application printing for a translated form.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form to print; other control types are ignored. |
This web implementation uses the same printing operation as PrintForm.
PrintForm(ctrl)
Invokes Wisej application printing for a translated form.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form to print; other control types are ignored. |
RemoveMessageActions(handler)
Deprecated: Deprecated. Use RemoveWindowActions()
Removes a delegate from this window's action manager.
| Parameter | Type | Description |
|---|---|---|
| handler | Delegate | The action delegate to remove. |
This obsolete entry point is equivalent to RemoveWindowActions.
RemoveWindowActions(handler)
Removes a delegate from this window's action manager.
| Parameter | Type | Description |
|---|---|---|
| handler | Delegate | The action delegate to remove. |
SendMessage(ctrl, msg, wParam, lParam)
Dispatches a SAL window action synchronously and returns its result.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| msg | Int32 | The SAL or application-defined message code. |
| wParam | SalNumber | The first message parameter. |
| lParam | SalNumber | The second message parameter. |
Returns: SalNumber. The action's return value, or zero if the target is unavailable or disposed.
SendMessageToChildren(ctrl, msg, wParam, lParam)
Dispatches a SAL message to the specified control's children.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| msg | Int32 | The SAL or application-defined message code. |
| wParam | SalNumber | The first message parameter. |
| lParam | SalNumber | The second message parameter. |
Returns: Boolean. The result of child-message dispatch; false if the parent is unavailable or disposed.
SendMessageToChildrenInternal(ctrl, msg, wParam, lParam)
Traverses a non-null container and dispatches an action to eligible child controls.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The non-null container; this entry point does not translate it. |
| msg | Int32 | The action code. |
| wParam | SalNumber | The first action parameter. |
| lParam | SalNumber | The 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.
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.
SetCancelButton(ctrl)
Sets a button as its containing form's cancel button.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The button to assign. |
Returns: Boolean. True if a compatible button and containing form are available; otherwise, false.
SetChecked(ctrl, value)
Sets a check box or radio button through its Wisej checked-state property.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control. |
| value | SalNumber | The numeric value converted to the checked state. |
Returns: Boolean. True for a supported target; otherwise, false.
SetContextMenu(ctrl, menuName, flags)
Creates and assigns a context menu for the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| menuName | String | The name used to resolve the menu type. |
| flags | Int32 | Use 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.
SetContextMenu(ctrl, menuType, flags)
Creates and assigns a context menu for the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| menuType | Type | The type of the menu to create. |
| flags | Int32 | Use 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.
SetCursor(ctrl, cursor, type)
Assigns a cursor to a supported SAL cursor role.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control. |
| cursor | Cursor | The cursor to assign for the window role. |
| type | Int32 | A 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.
SetCursor(ctrl, cursorId, type)
Assigns a predefined cursor to the requested role.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| cursorId | Int32 | A supported Sys.CURSOR_* cursor identifier. |
| type | Int32 | The 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.
SetCursor(ctrl, fileName, type)
Loads a cursor from a file and assigns it to the requested role.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| fileName | String | The cursor file path. |
| type | Int32 | The 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.
SetCursor(ctrl, blob, type)
Requests a cursor from binary data; this web implementation does not support binary cursor loading.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| blob | Byte[] | The binary cursor data. |
| type | Int32 | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: Boolean. Always false.
SetDataLength(ctrl, maxLength)
Sets a SAL edit control's maximum input length.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| maxLength | Int32 | The 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.
SetDefaultButton(ctrl)
Sets the specified button as the containing form's accept button.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if a compatible button and containing form are available; otherwise, false.
SetFocus(ctrl)
Requests keyboard focus for the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
SetFont(ctrl, name, size, enhancement)
Creates and assigns a font to the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| name | String | The font family name. |
| size | Int32 | The font size in points. |
| enhancement | Int32 | The combined Sys.FONT_Enh* style flags. |
Returns: Boolean. True if the font was created and assigned; otherwise, false.
SetFormat(ctrl, format)
Assigns a format picture, translating encoded SAL numeric format characters when present.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| format | String | The 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.
SetFormatCode(ctrl, format)
Applies a SAL format code through a format picture, character casing, or password setting.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| format | Int32 | The 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.
SetFormattedText(ctrl, text, applyFormat)
Assigns text through a SAL edit control's value property.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| text | String | The value text to assign. |
| applyFormat | Boolean | Retained for compatibility and ignored. |
Returns: Boolean. True if the control implements SAL editing; otherwise, false.
SetHintText(ctrl, text)
Assigns watermark text to a text box or combo box.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control. |
| text | String | The watermark text. |
Returns: Boolean. True for a supported target; otherwise, false.
SetInputMask(ctrl, mask)
Assigns the edit mask of a SAL edit control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| mask | String | The mask to assign. |
Returns: Boolean. True if the control implements SAL editing; otherwise, false.
SetLabel(ctrl, label)
Associates a label with a control hosted by a SAL form.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control to associate with the label. |
| label | Control | The label control to associate. |
Does nothing when the control cannot be resolved or its form does not implement SAL form behavior.
SetLabelText(ctrl, text)
Assigns the text of the specified control's associated label.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| text | String | The label text to display. |
Returns: Boolean. True if an associated label was found and updated; otherwise, false.
SetListSelectedIndex(ctrl, index)
Sets the selection index using SAL single- or multiple-selection rules.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The 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.
SetListSelectedItems(ctrl, index, select)
Changes selection in a list configured for multiple selection.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| index | Int32 | The item index, or -1 to affect every item. |
| select | Boolean | True to select; false to deselect. |
Returns: Boolean. True when the supported multiple-selection path accepts the request; otherwise, false.
SetListSelectedText(ctrl, startIndex, text)
Selects an item found by text search, wrapping to the beginning when necessary.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The list or combo-box control to access. |
| startIndex | Int32 | The starting index passed to the list search; -1 starts from the initial position. |
| text | String | The 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.
SetLocation(ctrl, pos)
Sets a control's location using form units.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control to position. |
| pos | PointF | The 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.
SetModified(ctrl, modified)
Sets the specified control's SAL modification flag.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| modified | Boolean | True 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.
SetProfile(ctrl, profile)
Assigns a formatting culture to a SAL edit control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| profile | Int32 | A 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.
SetProfileParameter(ctrl, paramCode, paramValue)
Changes a numeric parameter in a SAL edit control's writable formatting culture.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| paramCode | Int32 | The supported Sys.FMT_Parm_* parameter code. |
| paramValue | SalNumber | The 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.
SetProfileParameter(ctrl, paramCode, paramValue)
Changes a text parameter in a SAL edit control's writable formatting culture.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| paramCode | Int32 | The supported Sys.FMT_Parm_* parameter code. |
| paramValue | SalString | The 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.
SetProperty(ctrl, name, value)
Adds or replaces a named property on a SAL window.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL named-property collection is updated. |
| name | String | The case-sensitive property name. |
| value | String | The value to store, including null. |
Returns: Boolean. True if the translated control implements the SAL window contract; otherwise, false.
SetScrollBarPosition(ctrl, pos)
Sets a translated trackbar's value after clamping it to the current range.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The target control, which must resolve to a Wisej TrackBar. |
| pos | Int32 | The requested position. |
Returns: Boolean. True if the target is a trackbar; otherwise, false.
SetScrollBarRange(ctrl, min, max, line, page)
Sets a scrollbar's range and increments.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The scrollbar control. |
| min | Int32 | The new minimum. |
| max | Int32 | The new maximum, assigned through the SAL override when available. |
| line | Int32 | The small-change increment. |
| page | Int32 | The large-change increment. |
Returns: Boolean. True if the translated target is a scrollbar; otherwise, false.
SetSize(ctrl, size)
Sets a control's dimensions using form units.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control to resize. |
| size | SizeF | The new width and height in form units. |
Returns: Boolean. True if the control was resolved and resized; otherwise, false.
SetStatusBarText(ctrl, text)
Updates an associated form's status-bar text when a status bar can be found.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control used to locate the form. |
| text | String | The 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.
SetStatusBarText(menu, text)
Updates status text through the form that owns a menu's main menu.
| Parameter | Type | Description |
|---|---|---|
| menu | Menu | The menu used to locate the main menu and form. |
| text | String | The status text to assign. |
Returns: Boolean. False if the menu has no main menu; otherwise, the control-based status update result.
SetText(ctrl, text)
Assigns the control's text.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| text | String | The text to display. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
SetTimer(ctrl, id, millisec)
Starts or restarts a timer that sends SAL timer actions to the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| id | Int32 | The timer identifier sent in the first parameter of each Sys.SAM_Timer action. |
| millisec | Int32 | The interval between ticks, in milliseconds. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
SetWindowColor(ctrl, colorIndex, nColor)
Assigns a window or table-cell color.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
| colorIndex | Int32 | The Sys.COLOR_Index* component to change. |
| nColor | Int32 | The 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.
ShouldDispatch(code)
Tests whether an action should be sent to this window's handlers.
| Parameter | Type | Description |
|---|---|---|
| code | Int32 | The 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.
ShowStatusBar(ctrl, visible)
Changes the visibility of a form's status bar.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form that owns the accessory. |
| visible | Boolean | True to show the accessory; false to hide it. |
Returns: Boolean. True if the translated target is a form with the requested accessory; otherwise, false.
ShowToolBar(ctrl, visible)
Changes the visibility of a form's toolbar.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The form that owns the accessory. |
| visible | Boolean | True to show the accessory; false to hide it. |
Returns: Boolean. True if the translated target is a form with the requested accessory; otherwise, false.
ShowWindow(ctrl)
Shows the specified control or table column.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. The visibility state before the operation, or false if the control cannot be resolved.
ShowWindowAndLabel(ctrl)
Shows the specified control and its associated label.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. The control's visibility before the operation, or false if it cannot be resolved.
TrackPopupMenu(ctrl, menuName, flags, pos, callback)
Creates and displays a popup menu and disposes it after it closes.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control that owns the popup. |
| menuName | String | The name used to resolve the menu type. |
| flags | Int32 | Popup flags for right alignment and cursor coordinates. Center alignment and context-menu flags are not supported. |
| pos | Point | The screen position in pixels; cursor-coordinate flags override the corresponding coordinate. |
| callback | Action<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.
TrackPopupMenu(ctrl, menuType, flags, pos, callback)
Creates and displays a popup menu and disposes it after it closes.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control that owns the popup. |
| menuType | Type | The menu type to instantiate. |
| flags | Int32 | Popup flags for right alignment and cursor coordinates. Center alignment and context-menu flags are not supported. |
| pos | Point | The screen position in pixels; cursor-coordinate flags override the corresponding coordinate. |
| callback | Action<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.
TranslateColor(color)
Converts a drawing color to a SAL color constant or Win32 color value.
| Parameter | Type | Description |
|---|---|---|
| color | Color | The color to translate. |
Returns: Int32. A matching SAL system/default/transparency constant when available; otherwise, the Win32 color value.
TranslateControl(ctrl)
Resolves a wrapper or secondary-base control to the visual instance used by SAL operations.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The 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.
TranslateProfile(profile)
Resolves a SAL formatting profile to a culture.
| Parameter | Type | Description |
|---|---|---|
| profile | Int32 | A SAL country/default profile constant or a locale identifier. |
Returns: CultureInfo. The mapped cached culture, or the current SAL culture for the default profile.
TranslateSalColor(nColor)
Converts a SAL color constant or Win32 color value to a drawing color.
| Parameter | Type | Description |
|---|---|---|
| nColor | SalNumber | The SAL color value. |
Returns: Color. The mapped color; SAL null and COLOR_Default produce Color.Empty, and COLOR_None produces transparency.
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.
Update(ctrl)
Requests an update of the specified control.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control on which to perform the SAL operation. |
Returns: Boolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
UpdateMainMenu(form)
Refreshes SAL items in a form's merged or regular main menu.
| Parameter | Type | Description |
|---|---|---|
| form | Form | The 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.
Validate(ctrl, showErrorMessage)
Validates a SAL edit control and applies its format after successful validation.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control whose SAL editing behavior is accessed. |
| showErrorMessage | Boolean | True to display the SAL invalid-data message when validation fails. |
Returns: Boolean. True after successful validation and formatting; otherwise, false.
WaitCursor(wait)
Deprecated: Sal.WaitCursor is not supported.
Retains the obsolete wait-cursor API without changing any cursor.
| Parameter | Type | Description |
|---|---|---|
| wait | Boolean | Ignored by this web implementation. |
Returns: Boolean. Always true.