SalWindow

PPJ.Runtime.Windows.SalWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Web.49 (4.9.0.0)

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

public class SalWindow

Constructors

SalWindow(salWnd)

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

Name
Type
Description

Properties

DesignMode

Booleanarrow-up-right: Returns/Sets the DesignMode flag.

DragLocation

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

DragSource

Controlarrow-up-right: Returns the source control for the drag-drop operations.

DropData

IDataObjectarrow-up-right: Returns the data object bring dropped for the drag-drop operations.

DropDisabled

Booleanarrow-up-right: Enables/Disables drag-drop operations.

DropLocation

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

DropTarget

Controlarrow-up-right: Returns the drop target control.

KeepMask

Booleanarrow-up-right: Enables/Disables keeping the mask when reading the text from a masked edit control.

MapEnterToTab

Booleanarrow-up-right: Enables/Disables the mapping of the enter key to the tab key.

NamedProperties

SalNamedPropertiesarrow-up-right: Returns the collection of named properties.

Methods

AddListItem(ctrl, text)

Adds a string to the list control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

text

Text to add to the list.

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

AddMessageActions(handler)

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

Parameter
Type
Description

AddMessageActions(target)

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

Parameter
Type
Description

AddWindowActions(handler)

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

Parameter
Type
Description

AddWindowActions(target)

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

Parameter
Type
Description

AddWinSDKCriticalEvents(events)

Returns critical events for the WinSDK messages emulation.

Parameter
Type
Description

BringToTop(ctrl)

Brings a window to the top of all overlapping windows.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

CanCopy()

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

Returns: Booleanarrow-up-right.

CanCut()

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

Returns: Booleanarrow-up-right.

CanPaste()

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

Returns: Booleanarrow-up-right.

CanUndo()

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

Returns: Booleanarrow-up-right.

Center(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

Clear(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

Clear()

Deletes the selection in the control with the focus.

Returns: Booleanarrow-up-right.

ClearCursor(ctrl, type)

Clears a window's cursor.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

ClearList(ctrl)

Deletes all entries from the list control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

Copy()

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

Returns: Booleanarrow-up-right.

CopyProfile(ctrl, profile)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

CopyString(text)

Copies the text to the clipboard.

Parameter
Type
Description

CreateFont(name, size, enhancement)

Creates a Font object from the specified parameters.

Parameter
Type
Description

Returns: Fontarrow-up-right.

CreateWindow(type, owner, args)

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

Returns: Controlarrow-up-right.

CreateWindow(typeName, parent, args)

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

Parameter
Type
Description

Returns: Controlarrow-up-right.

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

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

Returns: Controlarrow-up-right.

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

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

Returns: Controlarrow-up-right.

Cut()

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

Returns: Booleanarrow-up-right.

DeleteListItem(ctrl, index)

Deletes a list box or combo box entry.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to remove from the list.

Returns: Int32arrow-up-right.

Destroy(ctrl)

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

Parameter
Type
Description

ctrl

Control to dispose.

Returns: Booleanarrow-up-right.

DisableWindow(ctrl)

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

Parameter
Type
Description

ctrl

Control to disable.

Returns: Booleanarrow-up-right.

DisableWindowAndLabel(ctrl)

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

Parameter
Type
Description

ctrl

Control to disable together with its associated label.

Returns: Booleanarrow-up-right.

DragAcceptFiles(ctrl, accept)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

DragDropStart(data)

Initiates drag-drop mode.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

DragDropStop()

Aborts drag mode.

Returns: Booleanarrow-up-right.

EnableWindow(ctrl)

Enables keyboard and mouse input to a window.

Parameter
Type
Description

ctrl

Control to enable.

Returns: Booleanarrow-up-right.

EnableWindowAndLabel(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

EndDialog(ctrl, value)

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

Parameter
Type
Description

ctrl

Dialog to terminate.

value

Value to assign to the dialog's ReturnValue field.

Returns: Booleanarrow-up-right.

FindChild(ctrl, name)

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

Parameter
Type
Description

ctrl

Container control.

name

The name of the child control to find.

Returns: Controlarrow-up-right.

FindChild(ctrl, type)

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

Parameter
Type
Description

ctrl

Container control.

type

The Typearrow-up-right of the child control to find.

Returns: Controlarrow-up-right.

FindControl(ctrl, name)

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

Parameter
Type
Description

ctrl

Container control.

name

The name of the member control to find.

Returns: Controlarrow-up-right.

FindMember(ctrl, name)

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

Parameter
Type
Description

ctrl

Container control.

name

The name of the member to find.

Returns: ReferenceInfo.

FireWindowActions(ctrl, msgCode, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: WindowActionsEventArgsarrow-up-right.

FireWindowActionsToChildren(ctrl, msg, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

FireWinSDKEvent(e)

Processes the client event to generate the equivalent WinSDK message.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

FormUnitsToPixels(ctrl, units, vertical)

Computes the number of pixels in the number form units.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

FromHandle(handle, type)

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

Parameter
Type
Description

Returns: Objectarrow-up-right.

GetClassName(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetClientArea(form)

Returns the SalClientArea panel.

Parameter
Type
Description

Returns: SalFormClientAreaarrow-up-right.

GetControlName(ctrl)

Gets the name of a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetControlName(ctrl, sName)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetControlType(ctrl)

Returns the type of control (TYPE_*).

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

GetDataLength(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

GetDataType(ctrl)

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

Parameter
Type
Description

Returns: Int32arrow-up-right. DT_*

GetDefaultButton(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Controlarrow-up-right.

GetFirstChild(parent, typeMask)

Returns the first child window of the specified type.

Parameter
Type
Description

parent

Parent control.

Returns: Controlarrow-up-right.

GetFocus()

Returns the control with the focus.

Returns: SalWindowHandlearrow-up-right.

GetFont(ctrl, sName, nSize, nEnhancement)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetFont(font, name, size, enhancement)

Returns: Booleanarrow-up-right.

GetFontNames()

Gets the names of the screen or printer fonts.

Returns: String[]arrow-up-right.

GetFormat(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetFormatCode(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

GetFormattedText(ctrl, format)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetInputMask(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetLabel(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Controlarrow-up-right.

GetLabelText(ctrl)

Retrieves the label text of a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetLabelText(ctrl, maxLen)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetLabelText(ctrl, sText, maxLen)

Parameter
Type
Description

Returns: SalNumberarrow-up-right.

GetListItemsCount(ctrl)

Returns the number of list box or combo box entries.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right. Number of items in the list.

GetListItemState(ctrl, index)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to check the state for.

Returns: Booleanarrow-up-right. True if the item at the index position is selected, otherwise false.

GetListItemText(ctrl, index)

Returns an entry in the list box or combo box.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to retrieve the text from.

Returns: Stringarrow-up-right. Text of the specified item.

GetListItemText(ctrl, index, text)

Parameter
Type
Description

Returns: Int32arrow-up-right.

GetListItemTextLength(ctrl, index)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to return the length for.

Returns: Int32arrow-up-right. Length of the text of the specified item.

GetListSelectedFile(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetListSelectedFile(ctrl, fileName)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetListSelectedIndex(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right. Index of the first selected item.

GetListSelectedItems(ctrl, selectedArray)

Fills the target array with the indexes of the selected entries in the listbox.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

selectedArray

Array to receive the list of selected indices.

Returns: Booleanarrow-up-right. Number of selected items, which is the number of elements in selectedArray .

GetListSelectedItemsCount(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right. Number of selected items in the list.

GetLocation(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: PointFarrow-up-right.

GetMdiClient(form)

Returns the MDI client area of the MDI container.

Parameter
Type
Description

Returns: MdiClientarrow-up-right.

GetMessageName(msg)

Parameter
Type
Description

Returns: Stringarrow-up-right.

GetNextChild(ctrl, typeMask)

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

Parameter
Type
Description

ctrl

Precedent control.

Returns: Controlarrow-up-right.

GetParent(ctrl)

Returns the handle of an object's parent window.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Controlarrow-up-right.

GetProfile(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

GetProfileParameter(ctrl, paramCode, paramValue)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetProfileParameter(ctrl, paramCode, paramValue)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetProperty(ctrl, name)

Gets the value of a named property for a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetProperty(ctrl, name, sValue)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetSalMessageName(msg)

Returns the name of a SAM message.

Parameter
Type
Description

Returns: Stringarrow-up-right.

GetScrollBarPosition(ctrl)

Returns the current scroll bar value.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

GetSize(ctrl)

Returns a window's size.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SizeFarrow-up-right.

GetSortedControls(parent)

Returns the collection of controls sorted by the TabIndex.

Parameter
Type
Description

Returns: Control[]arrow-up-right.

GetState(ctrl)

Returns a window's current state.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

GetStatusBar(form)

Returns the SalStatusBar control.

Parameter
Type
Description

Returns: SalFormStatusBararrow-up-right.

GetStatusBarText(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetSysColor(colorIndex)

Gets a system color.

Parameter
Type
Description

Returns: Int32arrow-up-right. nColor

GetText(ctrl)

Retrieves the text of a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Stringarrow-up-right.

GetText(ctrl, text, maxLen)

Parameter
Type
Description

Returns: Int32arrow-up-right.

GetText(ctrl, maxLen)

Returns the string value of the specified control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalStringarrow-up-right.

GetTextUnmasked(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalStringarrow-up-right.

GetToolBar(form)

Returns the SalToolbar control.

Parameter
Type
Description

Returns: SalFormToolBararrow-up-right.

GetWindowColor(ctrl, colorIndex)

Gets a window's color.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Int32arrow-up-right.

HasAccessories(ctrl)

Returns true if the form has the accessories panels.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

HideWindow(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right. True if the control was previously visible.

HideWindowAndLabel(ctrl)

Hides a control and its associated label.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

InsertListItem(ctrl, index, text)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Position in the list where to insert the text .

text

Text of the item to insert in the list.

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

Invalidate(ctrl)

Causes a window to be repainted.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsChecked(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsDerivedFrom(ctrl, type)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsEmpty(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsEnabled(ctrl)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsKeyboardMessage(msg)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsModified(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsMouseMessage(msg)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsSalMessage(msg)

Returns true if the message is a known SAM message.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsScrollBarVisible(control, bars)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValid(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsValidDateTime(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsValidDecimal(ctrl, precision, scale)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsValidEditMask(mask)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValidFormat(format, code)

Validates a numeric or date/time picture format.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValidInteger(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsValidNumber(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

IsVisible(ctrl)

Determines whether a window is currently visible.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

KillTimer(ctrl, id)

Destroys an control's system timer.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

ListGetMultiSelect(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: IListarrow-up-right. List of selected indices.

MessageBox(owner, text, title, flags, callback)

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

Parameter
Type
Description

owner

Owner of the message box.

text

Message text to display in the message box.

title

Title to display in the caption area.

flags

Combination of the Sys.MB_* flags to set the buttons and icons of the message box.

callback

Optional callback handler. When set, the MessageBox is not modal.

Returns: SalNumberarrow-up-right.

ModalDialog(type, owner, args)

Creates a modal dialog box.

Parameter
Type
Description

type

The dialog to create.

owner

Owner of the dialog.

args

Optional startup arguments.

Returns: Int32arrow-up-right. The value set when closing the dialog using EndDialogarrow-up-right.

ModalDialog(type, owner, callback, args)

Creates a modal dialog box.

Parameter
Type
Description

type

The dialog to create.

owner

Owner of the dialog.

callback

Callback method, invoked when the dialog is closed.

args

Optional startup arguments.

ModalDialog(typeName, owner, args)

Creates a modal dialog box.

Parameter
Type
Description

typeName

Name of the dialog to create.

owner

Owner of the dialog.

args

Optional startup arguments.

Returns: Int32arrow-up-right. The value set when closing the dialog using EndDialogarrow-up-right.

ModalDialogAsync(type, owner, args)

Creates a modal dialog box asynchronously.

Parameter
Type
Description

type

The dialog to create.

owner

Owner of the dialog.

args

Optional startup arguments.

Returns: Task<Int32>arrow-up-right.

Move(ctrl, offset)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

Paste()

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

Returns: Booleanarrow-up-right.

PasteString(text)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

PixelsToFormUnits(ctrl, pixels, vertical)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Singlearrow-up-right.

PopulateList(ctrl, hSql, sql)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

hSql

SalSqlHandlearrow-up-right to use to execute the sql command.

sql

SQL command to execute to populate the list.

Returns: Booleanarrow-up-right.

PopulateList(ctrl, hSql, sql, errorHandler)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

hSql

SalSqlHandlearrow-up-right to use to execute the sql command.

sql

SQL command to execute to populate the list.

errorHandler

Error handle callback.

Returns: Booleanarrow-up-right.

PopulateListFiles(ctrl, ctrlPath, pathName, attributes)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

PostMessage(ctrl, msg, wParam, lParam)

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

Returns: Booleanarrow-up-right.

PreviewForm(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

PrintForm(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

RemoveMessageActions(handler)

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

Parameter
Type
Description

RemoveWindowActions(handler)

Removes the specified handler from the list.

Parameter
Type
Description

SendMessage(ctrl, msg, wParam, lParam)

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

Returns: SalNumberarrow-up-right.

SendMessageToChildren(ctrl, msg, wParam, lParam)

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

Returns: Booleanarrow-up-right.

SendMessageToChildrenInternal(ctrl, msg, wParam, lParam)

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

Returns: Booleanarrow-up-right.

SendValidateMessage()

Sends a SAM_Validate message to the object with the focus.

Returns: Int32arrow-up-right.

SetContextMenu(ctrl, menuName, flags)

Defines the context menu for a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetContextMenu(ctrl, menuType, flags)

Defines the context menu for a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetCursor(ctrl, cursor, type)

Sets a window's cursor.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetCursor(ctrl, cursorId, type)

Sets a window's cursor.

Parameter
Type
Description

cursorId

Specify one of these system-supplied cursors: CURSOR_Arrow CURSOR_Cross CURSOR_IBeam CURSOR_Icon CURSOR_Size CURSOR_SizeNESW CURSOR_SizeNS CURSOR_SizeNWSE CURSOR_SizeWE CURSOR_UpArrow CURSOR_Wait

Returns: Booleanarrow-up-right.

SetCursor(ctrl, fileName, type)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

fileName

The name of a cursor or an icon file.

Returns: Booleanarrow-up-right.

SetCursor(ctrl, blob, type)

Sets a window's cursor from a string variable.

Returns: Booleanarrow-up-right.

SetDataLength(ctrl, maxLength)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetDefaultButton(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetFocus(ctrl)

Sets the focus to a specified window.

Parameter
Type
Description

Returns: Controlarrow-up-right.

SetFont(ctrl, name, size, enhancement)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetFormat(ctrl, format)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetFormatCode(ctrl, format)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

SetFormattedText(ctrl, text, applyFormat)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetInputMask(ctrl, mask)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetLabel(ctrl, label)

Changes the Label assigned to the specified control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

SetLabelText(ctrl, text)

Sets the label text of a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetListSelectedIndex(ctrl, index)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to select. Use -1 to select all items and -2 to deselect all items.

Returns: Booleanarrow-up-right.

SetListSelectedItems(ctrl, index, select)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to select or deselect. Use -1 to select or deselect all the items in the list.

select

True to select the specified item(s), false to deselect the item(s).

Returns: Booleanarrow-up-right.

SetListSelectedText(ctrl, startIndex, text)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

startIndex

Position where to start the search for text .

text

Text to search for in the list.

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

SetLocation(ctrl, pos)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetModified(ctrl, modified)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetProfile(ctrl, profile)

Changes the custom profile of the specified field.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetProfileParameter(ctrl, paramCode, paramValue)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetProfileParameter(ctrl, paramCode, paramValue)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetProperty(ctrl, name, value)

Sets the value of a named property for a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetScrollBarPosition(ctrl, pos)

Sets a scroll bar's position.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

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

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

Returns: Booleanarrow-up-right.

SetSize(ctrl, size)

Resizes a window.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetStatusBarText(ctrl, text)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetStatusBarText(menu, text)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

SetText(ctrl, text)

Sets the text of a control to a specified string.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

SetTimer(ctrl, id, millisec)

Creates a system timer for a given control.

Parameter
Type
Description

ctrl

Control that owns the timer.

id

Unique time id, sent back in Sys.wParam.

millisec

Interval in milliseconds.

Returns: Booleanarrow-up-right.

SetWindowColor(ctrl, colorIndex, nColor)

Sets a window's color.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

ShouldDispatch(code)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

ShowStatusBar(ctrl, visible)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

ShowToolBar(ctrl, visible)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

ShowWindow(ctrl)

Makes a control visible.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right. True if the control was previously visible.

ShowWindowAndLabel(ctrl)

Makes a control and its associated label visible.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

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

Shows context popup menu at runtime.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

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

Shows context popup menu at runtime.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

TranslateColor(color)

Converts .NET colors to the corresponding SAL color constant.

Parameter
Type
Description

Returns: Int32arrow-up-right.

TranslateControl(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Controlarrow-up-right.

TranslateProfile(profile)

Translates CTD profile codes to the equivalent .NET CultureInfo.

Parameter
Type
Description

Returns: CultureInfoarrow-up-right.

TranslateSalColor(nColor)

Converts SAL colors to a .NET Color.

Parameter
Type
Description

Returns: Colorarrow-up-right.

Undo()

Undoes the last edit in the control with the focus.

Returns: Booleanarrow-up-right.

Update(ctrl)

Forces the repaint of a control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: Booleanarrow-up-right.

UpdateMainMenu(form)

Updates the form's main menu.

Parameter
Type
Description

Returns: Booleanarrow-up-right.

Validate(ctrl, showErrorMessage)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

showErrorMessage

Returns: Booleanarrow-up-right.

WaitCursor(wait)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

Last updated