Sal

PPJ.Runtime.Sal

Namespace: PPJ.Runtime

Assembly: PPJ.Web.49 (4.9.0.0)

Contains all Sal.* static functions.

public class Sal

Properties

ScriptEngine: Returns the instance of the interpreter used by SalCompileAndEvaluate.

Type: Returns/Sets the type of the ISalReport implementation.

Methods

Halts processing of the current menu action, message action, or application action.

ParameterTypeDescription

exitCode

Returns: SalBoolean.

Disables input to all open forms.

Returns: SalBoolean.

Enables input to all open forms that were disabled.

Returns: SalBoolean.

Finds a visible top-level window.

ParameterTypeDescription

name

activate

Returns: SalWindowHandle.

Returns the average value of all the numbers in an array.

ParameterTypeDescription

array

The name of an array of numbers.

Returns: SalNumber. nAvg

ParameterTypeDescription

array

dim

Returns: SalBoolean.

ParameterTypeDescription

array

dim

bound

Returns: SalBoolean.

ParameterTypeDescription

array

dim

bound

Returns: SalBoolean.

Determines if a dynamic array contains data.

ParameterTypeDescription

array

The name of the array to query.

Returns: SalBoolean. bData

Returns the maximum value in an array of numbers.

ParameterTypeDescription

array

Returns: SalNumber.

Returns the minimum value in an array of numbers.

ParameterTypeDescription

array

Returns: SalNumber.

ParameterTypeDescription

array

min

max

Returns: SalNumber.

Sets the lower and upper bound of an array for the first dimension only. NOTE: In SAL this function was named SalSetArrayBounds().

ParameterTypeDescription

array

The name of the array to query.

lower

The new lower bound.

upper

The new upper bound or AC_Dynamic.

Returns: SalBoolean. bOk

Sets the upper bound of an array. The first dimension is 1.

ParameterTypeDescription

array

dim

bound

Returns: SalBoolean.

Returns the sum of the elements in an array of numbers.

ParameterTypeDescription

array

The name of an array of numbers.

Returns: SalNumber. nSum

Brings a window to the top of all overlapping windows.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

Centers a window. If the window is a top-level window, it centers it on the desktop. If the window is a child window, it centers it on top of its parent.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

Composes a color from red, green, and blue values.

ParameterTypeDescription

red

A number from 0 to 255.

green

A number from 0 to 255.

blue

A number from 0 to 255.

Returns: SalNumber. colorValue

Gets a window's color.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

colorIndex

Returns: SalNumber.

Gets a system color.

ParameterTypeDescription

colorIndex

The color of a part of the window, represented by one of these constants: COLOR_SysWindow COLOR_SysWindowFrame COLOR_SysWindowText

Returns: SalNumber. colorValue

Sets a window's color.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

colorIndex

colorValue

Returns: SalBoolean.

ParameterTypeDescription

colorValue

red

green

blue

Returns: SalBoolean.

ParameterTypeDescription

color

red

green

blue

Returns: SalBoolean.

ParameterTypeDescription

sExpression

nError

nErrorPos

numReturn

sReturn

dtReturn

windowReturn

bInhibitErrors

context

Returns: SalNumber.

Returns: SalString.

Returns an instance of SalStringContext wrapping the current context reference.

ParameterTypeDescription

context

Returns: SalStringContext.

Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

menuName

flags

Returns: SalBoolean.

Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

menuType

flags

Returns: SalBoolean.

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

ParameterTypeDescription

tWndToCreate

parent

parameters

Returns: SalWindowHandle.

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

ParameterTypeDescription

formName

parent

parameters

Returns: SalWindowHandle.

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

ParameterTypeDescription

formName

parent

Returns: SalWindowHandle.

Creates a form window, dialog box, or table window as a child of another form window,

ParameterTypeDescription

tWndToCreate

parent

left

top

width

height

flags

Parameters

Returns: SalWindowHandle.

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

ParameterTypeDescription

formName

parent

left

top

width

height

flags

Returns: SalWindowHandle.

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

ParameterTypeDescription

formName

parent

left

top

width

height

flags

Returns: SalWindowHandle.

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

ParameterTypeDescription

formName

parent

Returns: SalWindowHandle.

Clears a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

type

Returns: SalBoolean.

Sets a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

resourceId

type

Returns: SalBoolean.

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

type

Returns: SalBoolean.

Sets a window's cursor from a string variable.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

blob

type

Returns: SalBoolean.

Returns the date/time constructed from the parameters year, nMonth, nDay, nHour, minute, and nSecond.

ParameterTypeDescription

year

month

day

hour

minute

second

Returns: SalDateTime.

Returns the PC's current date/time.

Returns: SalDateTime.

Returns the day portion (1 to 31) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the hour portion (0 to 23) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the minute portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the month portion (1 to 12) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the date of the first day of the month or it returns DATETIME_Null if the value you specify is null. For example, if dateTime is December 25, 1992, SalDateMonthBegin returns December 1, 1992.

ParameterTypeDescription

dateTime

Returns: SalDateTime.

Returns the quarter of the year (1 to 4) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the date of the first day of the quarter of a date/time value or it returns DATETIME_Null if the value you specify is null.

ParameterTypeDescription

dateTime

Returns: SalDateTime.

Returns the seconds portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

ParameterTypeDescription

date

target

Returns: SalNumber.

Returns the date of the previous Monday or the current day if it is a Monday or it returns DATETIME_Null if the value you specify is null.

ParameterTypeDescription

dateTime

Returns: SalDateTime.

Returns the day of the week as a number between 0 and 6 or returns -1 if you specify DATETIME_Null as a parameter. 0 represents Saturday, 1 represents Sunday, and so on.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription

dateTime

Returns: SalNumber.

Returns the date of the first day of the year or it returns DATETIME_Null if the value you specify is null.

ParameterTypeDescription

dateTime

Returns: SalDateTime.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

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

Target control on which to execute the call.

Returns: SalBoolean.

Disables keyboard and mouse input to a window and grays out its associated label. A label is the label control that immediately precedes the window. The label control must have a mnemonic. 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

Target control on which to execute the call.

Returns: SalBoolean.

ParameterTypeDescription

ctrl

title

colorValue

Returns: SalBoolean.

ParameterTypeDescription

ctrl

name

size

enhancements

color

Returns: SalBoolean.

ParameterTypeDescription

windowDlg

orientation

Returns: SalBoolean.

ParameterTypeDescription

ctrl

dialogTitle

roots

filters

filtersCount

filterIndex

fileName

filePath

Returns: SalBoolean.

ParameterTypeDescription

ctrl

dialogTitle

roots

filters

filtersCount

filterIndex

fileNames

filePaths

fileCount

Returns: SalBoolean.

ParameterTypeDescription

ctrl

dialogTitle

roots

filters

filtersCount

filterIndex

fileName

filePath

Returns: SalBoolean.

Causes a dialog box to dock or undock with a parent window.

ParameterTypeDescription

windowDlg

orientation

Returns: SalBoolean.

Disables dropping while in drag mode.

Returns: SalBoolean.

Enables dropping while in drag mode.

Returns: SalBoolean.

Returns the IDataObject being dropped.

Returns: IDataObject.

ParameterTypeDescription

window

x

y

Returns: SalBoolean.

ParameterTypeDescription

windowTarget

x

y

Returns: SalBoolean.

Initiates drag mode.

ParameterTypeDescription

ctrl

Returns: SalBoolean.

Ends drag mode.

Returns: SalBoolean.

Redraws the menu bar for a given form window or top-level table window.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

Retrieves the uploaded file.

ParameterTypeDescription

nFileIndex

Index of the file stream to retrieve.

Returns: Stream.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

bAccept

Returns: SalBoolean.

Retrieves the names of the files dropped on a window. Receipt of the SAM_DropFiles message indicates that the user dropped files onto the window.

ParameterTypeDescription

sArrayFiles

Returns: SalNumber.

ParameterTypeDescription

ctrl

x

y

Returns: SalBoolean.

Indicates whether you can copy from the currently selected control on the clipboard.

Returns: SalBoolean. bOk

Returns: SalBoolean.

Indicates whether you can cut from the currently selected control on the clipboard.

Returns: SalBoolean. bOk

Returns TRUE if there is data on the Clipboard that can be pasted into the currently selected control

Returns: SalBoolean. bOk

Returns: SalBoolean.

Returns TRUE if the if there is any editing of the currently selected control that can be undone.

Returns: SalBoolean. bOk

Deletes selected data from the currently selected control

Returns: SalBoolean. bOk

Copies selected data from the currently selected control and puts it on the Clipboard.

Returns: SalBoolean. bOk

Copies a string to the Clipboard as text.

ParameterTypeDescription

str

The string to copy to the Clipboard.

Returns: SalBoolean. bOk

Returns: SalBoolean.

Cuts selected data from the currently selected control and puts it on the Clipboard.

Returns: SalBoolean. bOk

Pastes data from the Clipboard into the currently selected control

Returns: SalBoolean. bOk

Returns: SalBoolean.

ParameterTypeDescription

str

Returns: SalBoolean.

Undoes the last edit to the currently selected control Editing that you can undo includes inserting text, cutting text, clearing text, and pasting text.

Returns: SalBoolean.

Enables keyboard and mouse input to a window.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

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.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

returnValue

Returns: SalBoolean.

Stops tracing.

Returns: SalBoolean.

ParameterTypeDescription

file

Returns: SalBoolean.

Copies the contents of one file (source) to another file (destination).

ParameterTypeDescription

sourcePath

The full path name of the source file.

destPath

The full path name of the destination file.

overwrite

Specifies whether (TRUE) or not (FALSE) to overwrite the destination file. If the destination file already exists and overwrite is FALSE, then SalFileCopy fails, and returns FILE_CopyExist. If the destination file already exists and overwrite is TRUE, then SalFileCopy succeeds and the destination file is overwritten.

Returns: SalNumber. nStatus

Creates a directory.

ParameterTypeDescription

directory

The full path name of the new directory.

Returns: SalBoolean. bOk

ParameterTypeDescription

file

charValue

Returns: SalBoolean.

Returns the next character in an open file.

ParameterTypeDescription

file

The handle of the open file.

Returns: SalNumber. charValue

ParameterTypeDescription

path

Returns: SalBoolean.

ParameterTypeDescription

fileName

dateTime

Returns: SalBoolean.

Gets the letter of the default (current) disk drive.

Returns: SalString. sDriveLetter

ParameterTypeDescription

file

buffer

bufferSize

Returns: SalBoolean.

ParameterTypeDescription

file

fileName

style

Returns: SalBoolean.

ParameterTypeDescription

file

fileName

style

encoding

Returns: SalBoolean.

ParameterTypeDescription

file

fileName

style

reopen

Returns: SalBoolean.

Writes a character to an open file.

ParameterTypeDescription

file

charValue

Returns: SalBoolean.

Writes a string to an open file and appends a carriage return/line feed character to the string.

ParameterTypeDescription

file

str

Returns: SalBoolean.

ParameterTypeDescription

file

buffer

bufferLength

Returns: SalNumber.

ParameterTypeDescription

file

buffer

bufferLength

Returns: SalNumber.

Deletes a directory.

ParameterTypeDescription

directory

Returns: SalBoolean.

Positions the file pointer in an open file.

ParameterTypeDescription

file

bytes

position

Returns: SalBoolean.

Changes the current working directory. If the specified path does not contain a drive letter, the default drive's current directory is changed. Otherwise, the specified drive's current directory is changed and the specified drive is made the current drive.

ParameterTypeDescription

path

The path name of the new current working directory.

Returns: SalBoolean. bOk

Sets the modification date and time of the specified file.

ParameterTypeDescription

fileName

The name of the file whose modification date you want to set.

dateTime

The modification date and time.

Returns: SalBoolean. bOk

Sets the current disk drive to the specified drive letter.

ParameterTypeDescription

sDriveLetter

The new disk drive letter. The length of this parameter's value is one character. If you specify a value larger than this, reads only the first character.

Returns: SalBoolean. bOk

Returns the current position in an open file.

ParameterTypeDescription

file

The handle of an open file.

Returns: SalNumber. nPos

Writes a string to an open file.

ParameterTypeDescription

file

The handle of an open file. fileFile Handle. The handle of an open file.

buffer

The string to write to file.

bufferLength

The number of bytes to write.

Returns: SalNumber. nResult

Writes a binary buffer to an open file.

ParameterTypeDescription

file

The handle of an open file. fileFile Handle. The handle of an open file.

buffer

The string to write to file.

bufferLength

The number of bytes to write.

Returns: SalNumber. nResult

This function finds a child window of a given name in the specified window.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

windowName

Returns: SalWindowHandle.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nAction

Action type to send to ctrl .

wParam

First argument value to send with the action message.

lParam

second argument value to send with the action message.

Returns: SalNumber.

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.

nAction

Action type to send to the direct children of ctrl .

wParam

First argument value to send with the action message.

lParam

second argument value to send with the action message.

Returns: SalBoolean.

Copies the specified profile to the custom profile for the specified field. The control must use the customized profile set using FMT_Profile_Program.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nProfile

Returns: SalBoolean.

ParameterTypeDescription

ctrl

text

bFormat

Returns: SalBoolean.

Formats a date/time value using a given date/time picture format. If you do not specify a picture format or the one you specify is invalid, the default local settings are used

ParameterTypeDescription

dateTime

The date/time value to format.

sPicture

The date/time picture format.

Returns: SalString. sDateTime

Formats a number value using a number picture format. If you do not specify a picture format or the one you specify is invalid, the default local settings are used

ParameterTypeDescription

num

The number value to format.

sPicture

The number picture format.

Returns: SalString. sNumber

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalNumber.

ParameterTypeDescription

ctrl

sMask

Returns: SalBoolean.

ParameterTypeDescription

ctrl

nParm

nValue

Returns: SalBoolean.

ParameterTypeDescription

ctrl

nParm

value

Returns: SalBoolean.

ParameterTypeDescription

ctrl

sFormat

Returns: SalBoolean.

Returns the culture profile for the specified field.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalNumber.

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

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

ParameterTypeDescription

sMask

An input mask.

Returns: SalBoolean. bOk

Validates a numeric or date/time picture format.

ParameterTypeDescription

sFormat

nType

Returns: SalBoolean.

Turns on/off the flag that indicates whether to keep the mask when reading the text from masked edit controls.

ParameterTypeDescription

bKeep

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nFormat

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

sMask

Returns: SalBoolean.

Modifies the specified formatting rule on the control. The control must use the customized profile set using FMT_Profile_Program.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nParm

nValue

Returns: SalBoolean.

Modifies the specified formatting rule on the control. The control must use the customized profile set using FMT_Profile_Program.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nParm

value

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

sPicture

Returns: SalBoolean.

Changes the culture profile for the specified field.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nProfile

Returns: SalBoolean.

Copies a string to a data field or table window column. After copying the string to the field, formats the string.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

value

bFormat

Returns: SalBoolean.

ParameterTypeDescription

ctrl

text

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nValidate

Returns: SalBoolean.

ParameterTypeDescription

ctrl

name

size

nEnhancement

Returns: SalBoolean.

Gets the names of the screen or printer fonts.

ParameterTypeDescription

nType

A constant that specifies whether to get the screen or printer fonts: FONT_GetPrinter FONT_GetScreen

sFonts

The name of an array of strings that contains the font names returned.

Returns: SalNumber. nNames

ParameterTypeDescription

get

fontName

fontSizes

Returns: SalNumber.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

name

size

nEnhancement

Returns: SalBoolean.

Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

formUnits

vertical

Returns: SalNumber.

Returns the current buffer length of a binary variable.

ParameterTypeDescription

buffer

Returns: SalNumber.

Returns the current buffer length of a string.

ParameterTypeDescription

str

Returns: SalNumber.

Returns a data field's or table window column's data type.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalNumber.

Returns the handle of the default push button on a form window or dialog box. The default push button is the one that has the focus by default.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalWindowHandle.

Returns the handle of the first child window of the specified type. You can use this function to get the handles of MDI child windows.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

typeMask

Returns: SalWindowHandle.

Returns the handle of the window with the focus.

Returns: SalWindowHandle. windowFocus

ParameterTypeDescription

ctrl

name

Returns: SalBoolean.

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

Returns the handle of the next child window that matches a specified type.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

typeMask

Returns: SalWindowHandle.

Retrieves the integer value of an entry in the specified section of an initialization file or registry.

ParameterTypeDescription

section

entry

defaultValue

fileName

Returns: SalNumber.

ParameterTypeDescription

section

entry

defaultValue

value

fileName

Returns: SalNumber.

Returns the instance of ISalReport that is identified by the handle.

ParameterTypeDescription

handle

The reference handle to the ISalReport object.

Returns: ISalReport.

Returns the version of the library.

Returns: SalNumber.

Retrieves the window handle of the label (label control) that is associated with the windowTarget parameter. There must be a mnemonic in that label, and it must immediately precede windowTarget, or this function will fail.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalWindowHandle.

ParameterTypeDescription

ctrl

text

maxLength

Returns: SalNumber.

ParameterTypeDescription

ctrl

x

y

Returns: SalBoolean.

ParameterTypeDescription

ctrl

width

height

Returns: SalBoolean.