SalApplication

PPJ.Runtime.Windows.SalApplication

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.49 (4.9.0.0)

Base class for SAL applications.

public class SalApplication

Constructors

Default constructor.

Constructs a new SalApplication instance and processes the startup arguments.

NameTypeDescription

args

Properties

Type: Returns the type of the application.

String: Returns the company of the application loaded from the AssemblyCompany attribute;

PrinterSettings: Returns the default printer settings. This is set by SalPrt

SizeF: Global autoscaling factor used for all forms in the application. It is empty by default. In which case the standard scaling is used.

SalApplication: Returns the instance of the application

Boolean: Enables/Disables the skinning of the entire application.

ApartmentState: Returns the threading model.

String: Returns the title of the application loaded from the AssemblyTitle attribute;

Form[]: Returns a list of all top-level forms that belong to this application.

Boolean: Returns the value of the internal property Control.UseCompatibleTextRendering.

Int32: Returns the version of the framework.

VisualStyler: Returns the thread-safe instance of the VisualStyler component. VisualStyler can be used directly to set advanced properties.

Boolean: Enables disables Windows visual styles.

Methods

Increase the reference count for the application object. It is called every time a new SalForm is created.

ParameterTypeDescription

form

Returns: Int32. Updated reference count

Enables skinning for the form.

ParameterTypeDescription

form

Enables skinning for the control.

ParameterTypeDescription

control

children

Queue the object to be disposed at the next idle notification.

ParameterTypeDescription

obj

Disables input to all open forms. Use SalAppDisable and SalAppEnable when there are multiple applications running simultaneously and you want to control which application receives user input.

Returns: Boolean. bOk

Enables input to all open forms that were disabled by SalAppDisable. Use SalAppDisable and SalAppEnable when there are multiple applications running simultaneously and you want to control which application receives user input.

Returns: Boolean. bOk

Stops all tracing. Any calls to SalTrace() occurring after SalEndTrace() will be ignored.

Returns: Boolean.

Finds a visible top-level window for the specified application. its window handle.

ParameterTypeDescription

name

activate

Returns: IntPtr. hWnd

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

ParameterTypeDescription

section

entry

defaultValue

fileName

Returns: UInt32.

ParameterTypeDescription

section

entry

defaultValue

value

fileName

Returns: Int32.

Generate an idle cycle.

Returns: Boolean. bOk

Registers a control to receive the specified message when there is an idle state.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

msg

wParam

lParam

Returns: Boolean.

Stops sending idle messages to a control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: Boolean.

Starts an application.

ParameterTypeDescription

name

args

Returns: Boolean.

ParameterTypeDescription

name

mode

retCode

Returns: Boolean.

ParameterTypeDescription

name

mode

retCode

Returns: Boolean.

Loads the specified skin file. When loading a skin file, skinning is enabled automatically.

ParameterTypeDescription

path

Loads the specified skin file from the application's embedded resources. When loading a skin file, skinning is enabled automatically.

ParameterTypeDescription

name

Loads the specified skin file from the assembly's embedded resources. When loading a skin file, skinning is enabled automatically.

ParameterTypeDescription

assembly

name

Pauses the application for the specified number of milliseconds while dispatching messages.

ParameterTypeDescription

usec

Forces the termination of the application.

Decreases the reference count for the application object. When the count drops to zero (or below if there is a bug), the application exits. It is called every time a Sal form is destroyed. This should emulate SAL application's behavior with respect to top level windows. When the last form is destroyed the app exits.

ParameterTypeDescription

form

Returns: Int32.

Disables skinning for the form.

ParameterTypeDescription

form

Disables skinning for the control.

ParameterTypeDescription

control

children

Main method to startup a SAL application. The SAL application class that extends SalApplication should call this method in the application's Main method. Example:


public static int Main(string[] args)
{
    return new PortedSalApplication().Run(args);
}
ParameterTypeDescription

args

Returns: Int32.

Set the value of an entry in the specified section of an initialization file or registry. All profile information is stored as string, so if you want to store an integer it must be converted to a string first. Then it can be retrieved as an integer using the SalGetProfileInt- Function .

ParameterTypeDescription

section

The section heading.

entry

The entry whose associated value is being set.

value

The value of sEntry.

fileName

The name of the initialization file or company name depending on the settings made using the SalUseRegistry function. If you are searching for an INI file and do not specify the full path, searches for the file in the Windows subdirectory.

Returns: Boolean. bOk

Allows tracing to begin.

ParameterTypeDescription

outputType

traceFile

clear

Returns: Boolean.

Outputs a string to the trace output target selected earlier in the SalStartTrace function. Note that if tracing is not already activated, this function will return TRUE even though no trace action is taken. When writing to the event log, the severity level is kept in numeric form. When writing to any other output target, it is translated into a text string such as "Warning".

ParameterTypeDescription

severity

text

Returns: Boolean.

Enables logging of unhandled exceptions in the event log.

ParameterTypeDescription

useLog

logAndcontinue

Returns: Boolean.

This function is used to re-direct all SalProfile* functions to use the Registry. All values for the SalProfile* functions are saved as strings. The INI file name used as the last parameter of the SalProfile* functions will be used as the application name. The resulting path will be: \HKEY_CURRENT_USER\Software<company name><application name><section><setting>\

ParameterTypeDescription

useRegistry

companyName

Returns: Boolean. bOk

Events

EventHandler Fired when the loaded skin changes.

Last updated