Páginas

sábado, 4 de outubro de 2014

Configura Impressora Manual

Configura Impressora Manual


C:\WinDev 19\Examples\Training\WD Printout Parameters\Exe


 // If the configuration was not performed, open the configuration window
IF gbConfigure = False THEN
    Open(WIN_Configuration)
END


iPreview(i100)

// Print
iPrintReport(RPT_Customer)


====
PROCEDURE SavePrintoutParameter() // Summary: This procedure is used to save the selected settings
sPrinterName is string
IF COMBO_PRINTERS = -1 THEN // Check the selected printer
    Error("Select a printer")
    RETURN
END
sPrinterName = COMBO_PRINTERS[COMBO_PRINTERS] // Retrieve the selected printer
// Configure the selected printer
iConfigure(sPrinterName)
IF CBOX_SAVE THEN // Display a hourglass if the settings must be saved as default settings // because the assignment can take quite a long time
    Info("Caution: Managing the network printers",...
    "If the selected printer is a network printer, make sure you have the rights for printer management",...
    "Otherwise, the modifications will not be saved in Windows")
    HourGlass(True)
END
iParameter(iCollate, CBOX_COLLATE) // Save the parameter for collating copies
iParameter(iTrueType, COMBO_TRUETYPE[COMBO_TRUETYPE]) // Save the management of TrueType fonts
iParameter(iScale, EDT_SCALE) // Save the scale
iParameter(iCopies, EDT_NB_COPIES) // Save the number of copies
SWITCH RADIO_ORIENTATION // Save the orientation
    CASE 1 // Portrait
        iParameter(iOrientation, iOrientation_Portrait)
    CASE 2 // Landscape
        iParameter(iOrientation, iOrientation_Landscape)
    OTHER CASE // no action
END
SWITCH RADIO_DOUBLE_SIDED // Save the duplex printout
    CASE 1 // No duplex printing
        iParameter(iDuplex, iDuplex_Simple)
    CASE 2 // Vertical-Duplex Printing
        iParameter(iDuplex, iDuplex_Vertical)
    CASE 3 // Horizontal-Duplex Printing
        iParameter(iDuplex, iDuplex_Horizontal)
    OTHER CASE // No action
END
SWITCH RADIO_COLOR // Save the color configuration
    CASE 1 // Color
        iParameter(iColor, iColor_Color)
    CASE 2 // Monochrome
        iParameter(iColor, iColor_Mono)
    OTHER CASE // No action
END
iParameter(iPrinterDefault, CBOX_SAVE)// Save the "default" parameter
HourGlass(False) // Remove the hourglass (if CBOX_SAVE is checked)



Nenhum comentário:

Postar um comentário