PrintLog Method (ALog)

Prints the contents of the log control using the default Windows printer.

Syntax

Object.PrintLog ( [ bPromptUser ], [sHeader], [sFooter])

The PrintLog method syntax has the following parts:

 

Name

Type

Description

Object

ALog

ALog control

bPromptUser

Val Bool

Nonzero if the printer setup dialog box is to be displayed, or zero to use the default printer.

sHeader

[Val] BString

Optional. Print header string (v5) - defaut value is no header string.

sFooter

[Val] BString

Optional. Print footer string (v5) - default value is no footer string.

Where

bPromptUser can have one of the following values:

 

Value

Description

True

Display the printer setup dialogue box.

False *

Use the default printer.

Comments

Additional setting for the printer can be set using the Internet Explorer Page Setup dialog or by setting the registry key HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup and you can also change the default printer by changing the following key HKCU\Software\Microsoft\Windows NT\CurrentVersion\indows\Device.

For more information on the ALog control, see the Microsoft WebBrowser control documentation in the Microsoft web site.

Example

The following example will print the ALog control using the current Windows default printer:

log1.PrintLog()

From ATEasy v5, you can also specify header as well as footer:

TesTexec.m_frmMain.logTestExec.PrintLog(,SDate()+", "+STime(), Program.UUT)
 

Applies to

ALog

See Also

PlainText