PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Reinitializing the print module
  • iConfigure and iParameter
  • Operating mode in GO mode and at run time
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
iConfigure (Function)
In French: iConfigure
Configures the printer for a print performed in WLanguage:
  • by opening the configuration window. If the information is validated by the user, the changes are performed for the current application only.
    Windows Mobile See Configuring the printer used on the Pocket PC for more details.
  • by modifying the printer used for the current print. This modification can be temporary (for the current program only) or permanent (the default printer is modified in the control panel of Windows for example).
To configure the printer when printing reports (created with the report editor), use iConfigureReport.
Example
WINDEVReports and QueriesWindows MobileJavaUser code (UMC)
IF iConfigure() = True THEN
// Creates a 48-point Pica font
iCreateFont(1, 48, iBold + iItalic, iRoman)
// Prints a text with this font
iPrint(iFont(1) + "48-pica text")
// Ends the print
iEndPrinting()
END
WEBDEV - Server codeAjax
IF iConfigure("ServerPrinter") = True THEN
// Creates a 48-point Pica font
iCreateFont(1, 48, iBold + iItalic, iRoman)
// Prints a text with this font
iPrint(iFont(1) + "48-pica text")
// Ends the print
iEndPrinting()
END
Syntax
WINDEVReports and QueriesWindows MobileJavaUser code (UMC)

Opening the standard window for configuring the print Hide the details

<Result> = iConfigure()
<Result>: Boolean
  • True if the information typed in the dialog box was validated by the user,
  • False if user cancelation.
WINDEVWEBDEV - Server codeWindows MobileJavaAjaxUser code (UMC)

Modifying the destination printer Hide the details

<Result> = iConfigure([<Printer Name> [, <Temporary Modification>]])
<Result>: Boolean
  • True if the change of printer was performed,
  • False otherwise.
<Printer Name>: Optional character string (with quotes)
Identifies the printer to use. Its name was defined in the control panel of or in the window for print configuration.
WINDEV If this name is not specified, the printer defined by default in Windows is selected.
Windows Mobile If this name is not specified, the printer defined by default in Windows is selected.
WEBDEV - Server code This parameter must necessarily be specified.
Java The printer name is "case sensitive": you must respect the uppercase and lowercase characters in the name.
<Temporary Modification>: Optional boolean
  • True (by default) if the modification of the printer must be taken into account for the current program. This change will remain effective until the end of program execution (except if iReset is called).
  • False if the modification of the printer must be performed in the control panel of Windows or in the window for configuring the print. The default printer is modified.
Java The modification of printer is always temporary. This parameter is ignored.
Remarks
WINDEVWEBDEV - Server codeWindows MobileJavaAjaxUser code (UMC)

Reinitializing the print module

If iConfigure returns True, the print module is reinitialized. Therefore, iConfigure must be used before any other print function. Otherwise, all the operations previously performed by the print functions will be ignored (the settings performed by iParameter for example).
If a print is in progress, iConfigure cancels this print. Therefore, iConfigure must be called before the start of print.
WEBDEV - Server code To directly print on a printer connected to the server, a specific configuration is required. See Configuring the server to perform a print for more details.
WINDEVWindows MobileUser code (UMC)

iConfigure and iParameter

WINDEV The dialog box displayed by iConfigure can be called from the dialog box opened by iParameter.
iParameter can be used instead of iConfigure. In this case, only the configuration window is displayed.
Windows Mobile

Operating mode in GO mode and at run time

  • In GO mode (simulation on the development computer), the standard window for selecting a printer is displayed.
  • At run time, the window for selecting a printer specific to WINDEV Mobile is displayed. This window is supplied with WINDEV Mobile.
The differences between GO mode (simulator) and real use are presented in Differences between GO mode and real use.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
Windows Mobile wp230prn.dll
Java wd230java.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
 // GET AND SET THE PRINTER STANDARD WINDOWS
sCurrentPrinter is string = iInfoPrinter() //Impressora Atual

sDefaultPrinter is string = iInfoPrinter(False) // Impressora Padrao do Painel de Controle

sDriverUsadoImpressoraPadrao is string = iInfoPrinter(False,iDriverName) //"winspool"

sNomeImpressoraPadrao is string = iInfoPrinter(False,iPrinterName) //"LX300"

sPortaImpressoraPadrao is string = iInfoPrinter(False,iDeviceName) //"LPT1:"

sListaTodasImpressorasInstaladas is string = iListPrinter() //LX300 CR HP1200 CR FAX CR CutePDF

//IMPORTANTE:

ok_situacao_01 is boolean = iConfigure("HP1200", False) // Mudar para a HP1200

IF ok_situacao_01 = True

Info("Impressora foi alterada com sucesso no painel de controle")

Info("
Printer has been successfully changed on the control panel")

ELSE
Info(ErrorInfo())
END

// OU

ok_situacao_02 is boolean = iConfigure("HP1200", True) // Mudar para a HP1200

IF ok_situacao_02 = True

Info("Impressora foi alterada com sucesso somente enquanto tiver usando o aplicativo windev")

Info("
Printer has been successfully changed only while you are using the WINDEV application")

ELSE
Info(ErrorInfo())
END

//Meu muito obrigado pela ajuda José Jorge Matos (Portugal).
adrianoboller
Apr. 30 2016