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
iListPrinter (Function)
In french: iListeImprimante
Returns the list of printers installed on the current computer.
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>)
Component : wd240prn.dll
Minimum version required
  • 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
21 Feb. 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
30 Apr. 2016