|
of_setprintpreview
|
|
Full name
|
pfc_n_ds.of_setprintpreview
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_setprintpreview(boolean)
|
public function integer of_setprintpreview (boolean ab_switch);//////////////////////////////////////////////////////////////////////////////
//
// Event: of_SetPrintPreview
//
// Arguments: ab_switch
// TRUE - Start (create) the service
// FALSE - Stop (destroy ) the service
//
// Returns: Integer
// 1 - Successful operation.
// 0 - No action taken.
// -1 - An error was encountered.
//
// Description:
// Starts or stops the printpreview service.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
//Check arguments
If IsNull(ab_switch) Then
Return -1
End If
IF ab_Switch THEN
IF IsNull(inv_printpreview) Or Not IsValid (inv_printpreview) THEN
inv_printpreview = Create n_cst_dssrv_printpreview
inv_printpreview.of_setRequestor ( this )
Return 1
END IF
ELSE
IF IsValid (inv_printpreview) THEN
Destroy inv_printpreview
Return 1
END IF
END IF
Return 0
end function