PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
iListPrinter (Function)
In French: iListeImprimante
Returns the list of printers installed on the current computer.
Windows Mobile The list of printers corresponds to the list of printers referenced on the Pocket PC. This list is also displayed in the configuration window (opened by iDestination or iParameter).
WEBDEV - Server code The list of printers correspond to the local printers installed on the Web server (and not on the computer of the Web user). The network printers are not listed.
Example
sPrinterList is string
sPrinterList = iListPrinter()
Syntax
<Result> = iListPrinter()
<Result>: Character string
List of printers in the following format:
<Printer 1> + CR + ... + <Printer N>

Where <Printer 1> ... <Printer N> correspond to the name of the printers.
Remarks
To display the list of printers in a List Box or Combo Box control, use the following syntax:
ListAdd(<Name of List Box or Combo Box Control>, <Result>)
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
Mostra Lista de impressoras
// mostra Lista de Impressoras
// e coloca no combox para selecionar

//
PROCEDURE escolhe_impressoras()
sLista_impressoras is string=iListPrinter() // lista impressoras
ListDeleteAll(COMBO_Impressoras) // limpar dados combox

FOR EACH STRING _nome_impressora OF sLista_impressoras SEPARATED BY CR
ListAdd(COMBO_Impressoras,_nome_impressora)
END


//Seleciona Impressora

EDT_Impressora_nfce=COMBO_Impressoras..StoredValue

//Imprimir ,

iConfigure(empresa_parametro_nfe.Impressora_nfce)
iPrintReport(RPT_danf_nfce,gn_id_nota_fiscal)

// Blog com video e exemplo

http://windevdesenvolvimento.blogspot.com.br/2017/02/aula-1059-windev-relatorio-042.html

https://www.youtube.com/watch?v=b7fRyWifFM8
De matos
Feb. 21 2017
 // GET AND SET THE PRINTER STANDARD WINDOWS
//PEGA E ALTERA 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
Apr. 30 2016