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

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

NameTypeDescription

salWnd

Properties

Boolean: Returns/Sets the DesignMode flag.

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

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

IDataObject: Returns the data object bring dropped for the drag-drop operations.

Boolean: Enables/Disables drag-drop operations.

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

Control: Returns the drop target control.

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

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

SalNamedProperties: Returns the collection of named properties.

Methods

Adds a string to the list control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

text

Text to add to the list.

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

ParameterTypeDescription

handler

ParameterTypeDescription

target

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

ParameterTypeDescription

handler

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

ParameterTypeDescription

target

Returns critical events for the WinSDK messages emulation.

ParameterTypeDescription

events

Brings a window to the top of all overlapping windows.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

Returns: Boolean.

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

Returns: Boolean.

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

Returns: Boolean.

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

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

Deletes the selection in the control with the focus.

Returns: Boolean.

Clears a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

type

Returns: Boolean.

Deletes all entries from the list control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

profile

Returns: Boolean.

Copies the text to the clipboard.

ParameterTypeDescription

text

Creates a Font object from the specified parameters.

ParameterTypeDescription

name

size

enhancement

Returns: Font.

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

ParameterTypeDescription

type

owner

args

Returns: Control.

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

ParameterTypeDescription

typeName

parent

args

Returns: Control.

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

ParameterTypeDescription

type

parent

left

top

width

height

flags

args

Returns: Control.

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

ParameterTypeDescription

typeName

parent

left

top

width

height

flags

Returns: Control.

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

Returns: Boolean.

Deletes a list box or combo box entry.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

index

Index of the item to remove from the list.

Returns: Int32.

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

ParameterTypeDescription

ctrl

Control to dispose.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Control to disable.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Control to disable together with its associated label.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

accept

Returns: Boolean.

Initiates drag-drop mode.

ParameterTypeDescription

data

Returns: Boolean.

Aborts drag mode.

Returns: Boolean.

Enables keyboard and mouse input to a window.

ParameterTypeDescription

ctrl

Control to enable.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Dialog to terminate.

value

Value to assign to the dialog's ReturnValue field.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Container control.

name

The name of the child control to find.

Returns: Control.

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

ParameterTypeDescription

ctrl

Container control.

type

The Type of the child control to find.

Returns: Control.

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

ParameterTypeDescription

ctrl

Container control.

name

The name of the member control to find.

Returns: Control.

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

ParameterTypeDescription

ctrl

Container control.

name

The name of the member to find.

Returns: ReferenceInfo.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

msgCode

wParam

lParam

Returns: WindowActionsEventArgs.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

msg

wParam

lParam

Returns: Boolean.

Processes the client event to generate the equivalent WinSDK message.

ParameterTypeDescription

e

Returns: Boolean.

Computes the number of pixels in the number form units.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

units

vertical

Returns: Int32.

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

ParameterTypeDescription

handle

type

Returns: Object.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

Returns the SalClientArea panel.

ParameterTypeDescription

form

Returns: SalFormClientArea.

Gets the name of a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

ParameterTypeDescription

ctrl

sName

Returns: Boolean.

Returns the type of control (TYPE_*).

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32.

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

ParameterTypeDescription

ctrl

Returns: Int32. DT_*

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Control.

Returns the first child window of the specified type.

ParameterTypeDescription

parent

Parent control.

typeMask

Returns: Control.

Returns the control with the focus.

Returns: SalWindowHandle.

ParameterTypeDescription

ctrl

sName

nSize

nEnhancement

Returns: Boolean.

ParameterTypeDescription

font

name

size

enhancement

Returns: Boolean.

Gets the names of the screen or printer fonts.

Returns: String[].

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

format

Returns: String.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Control.

Retrieves the label text of a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

maxLen

Returns: String.

ParameterTypeDescription

ctrl

sText

maxLen

Returns: SalNumber.

Returns the number of list box or combo box entries.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32. Number of items in the list.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

index

Index of the item to check the state for.

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

Returns an entry in the list box or combo box.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

index

Index of the item to retrieve the text from.

Returns: String. Text of the specified item.

ParameterTypeDescription

ctrl

index

text

Returns: Int32.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

index

Index of the item to return the length for.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

ParameterTypeDescription

ctrl

fileName

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32. Index of the first selected item.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

selectedArray

Array to receive the list of selected indices.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: PointF.

Returns the MDI client area of the MDI container.

ParameterTypeDescription

form

Returns: MdiClient.

ParameterTypeDescription

msg

Returns: String.

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

ParameterTypeDescription

ctrl

Precedent control.

typeMask

Returns: Control.

Returns the handle of an object's parent window.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Control.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32.

ParameterTypeDescription

ctrl

paramCode

paramValue

Returns: Boolean.

ParameterTypeDescription

ctrl

paramCode

paramValue

Returns: Boolean.

Gets the value of a named property for a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

name

Returns: String.

ParameterTypeDescription

ctrl

name

sValue

Returns: Boolean.

Returns the name of a SAM message.

ParameterTypeDescription

msg

Returns: String.

Returns the current scroll bar value.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32.

ParameterTypeDescription

ctrl

nMin

nMax

nLine

nPage

Returns: Boolean.

Returns a window's size.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SizeF.

Returns the collection of controls sorted by the TabIndex.

ParameterTypeDescription

parent

Returns: Control[].

Returns a window's current state.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Int32.

Returns the SalStatusBar control.

ParameterTypeDescription

form

Returns: SalFormStatusBar.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

Gets a system color.

ParameterTypeDescription

colorIndex

Returns: Int32. nColor

Retrieves the text of a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: String.

ParameterTypeDescription

ctrl

text

maxLen

Returns: Int32.

Returns the string value of the specified control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

maxLen

Returns: SalString.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalString.

Returns the SalToolbar control.

ParameterTypeDescription

form

Returns: SalFormToolBar.

Gets a window's color.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

colorIndex

Returns: Int32.

Returns true if the form has the accessories panels.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

Hides a control and its associated label.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

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: Int32. The index of the added item or Sys.LB_Err (-1) if there is an error.

Causes a window to be repainted.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

type

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Returns: Boolean.

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

ParameterTypeDescription

msg

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

msg

Returns: Boolean.

Returns true if the message is a known SAM message.

ParameterTypeDescription

msg

Returns: Boolean.

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

ParameterTypeDescription

control

bars

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

precision

scale

Returns: Boolean.

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

ParameterTypeDescription

mask

Returns: Boolean.

Validates a numeric or date/time picture format.

ParameterTypeDescription

format

code

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

Determines whether a window is currently visible.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

Destroys an control's system timer.

ParameterTypeDescription

ctrl

id

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: IList. List of selected indices.

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

ParameterTypeDescription

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: SalNumber.

Creates a modal dialog box.

ParameterTypeDescription

type

The dialog to create.

owner

Owner of the dialog.

args

Optional startup arguments.

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

Creates a modal dialog box.

ParameterTypeDescription

type

The dialog to create.

owner

Owner of the dialog.

callback

Callback method, invoked when the dialog is closed.

args

Optional startup arguments.

Creates a modal dialog box.

ParameterTypeDescription

typeName

Name of the dialog to create.

owner

Owner of the dialog.

args

Optional startup arguments.

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

Creates a modal dialog box asynchronously.

ParameterTypeDescription

type

The dialog to create.

owner

Owner of the dialog.

args

Optional startup arguments.

Returns: Task<Int32>.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

offset

Returns: Boolean.

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

Returns: Boolean.

ParameterTypeDescription

text

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

pixels

vertical

Returns: Single.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

hSql

SalSqlHandle to use to execute the sql command.

sql

SQL command to execute to populate the list.

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

hSql

SalSqlHandle to use to execute the sql command.

sql

SQL command to execute to populate the list.

errorHandler

Error handle callback.

Returns: Boolean.

ParameterTypeDescription

ctrl

ctrlPath

pathName

attributes

Returns: Boolean.

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

ParameterTypeDescription

ctrl

msg

wParam

lParam

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

ParameterTypeDescription

handler

Removes the specified handler from the list.

ParameterTypeDescription

handler

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

ParameterTypeDescription

ctrl

msg

wParam

lParam

Returns: SalNumber.

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

ParameterTypeDescription

ctrl

msg

wParam

lParam

Returns: Boolean.

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

ParameterTypeDescription

ctrl

msg

wParam

lParam

Returns: Boolean.

Sends a SAM_Validate message to the object with the focus.

Returns: Int32.

Defines the context menu for a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

menuName

flags

Returns: Boolean.

Defines the context menu for a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

menuType

flags

Returns: Boolean.

Sets a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

cursor

type

Returns: Boolean.

Sets a window's cursor.

ParameterTypeDescription

ctrl

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

type

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

fileName

The name of a cursor or an icon file.

type

Returns: Boolean.

Sets a window's cursor from a string variable.

ParameterTypeDescription

ctrl

blob

type

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

maxLength

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

Sets the focus to a specified window.

ParameterTypeDescription

ctrl

Returns: Control.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

name

size

enhancement

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

format

Returns: Boolean.

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

ParameterTypeDescription

ctrl

format

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

text

applyFormat

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

mask

Returns: Boolean.

Changes the Label assigned to the specified control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

label

Sets the label text of a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

text

Returns: Boolean.

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

ParameterTypeDescription

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: Boolean.

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

ParameterTypeDescription

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: Boolean.

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

ParameterTypeDescription

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: Int32. Index of the first item that matches the text or -1 if not found.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

pos

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

modified

Returns: Boolean.

Changes the custom profile of the specified field.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

profile

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

paramCode

paramValue

Returns: Boolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

paramCode

paramValue

Returns: Boolean.

Sets the value of a named property for a control.