PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
iInfoPrinter (Function)
In french: iInfoImprimante
Retrieves the characteristics of the current or default printer.
Example
// Retrieving the characteristics of the current printer
CurrentPrinter is string = iInfoPrinter()
// Recovering the characteristics of the default printer
DefaultPrinter is string = iInfoPrinter(False)

// Display an information dialog box
Info("The current printer is: " + CurrentPrinter + CR + ...
"The default printer is: " + DefaultPrinter)
Syntax
<Result> = iInfoPrinter([<Current Printer> [, <Type of Information>]])
<Result>: Character string
Requested information.
<Current Printer>: Optional boolean
  • True (default value) to get information about the current printer,
  • False to get information about the default printer.
<Type of Information>: Optional integer constant
Type of information to retrieve.
iDriverNameDriver Name
iPrinterName
(default value)
Printer Name
iDeviceNameName of printer port used
Component : wd250prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
PRINTER DEFAULT CONTROL PANEL THE WINDOWS
//PEGA A IMPRESSORA PADRAO DO 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
30 Apr. 2016