Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "print" in [All]

winmm

.

"WAVEOUTCAPS" [http://msdn2.microsoft.com/en-us/library/ms713743(d=printer).aspx]

xpsprint

.
Namespace
xpsprint
.
Description
xpsprint.dll
.
Title
xpsprint.dll

urlmon

.

  Debug.Print PtrToString(buffAddr)

user32

.

                VK_PRINT = 0x2A,

.

    VK_PRINT     = 0x2A,

.

Prints time in seconds since last user input.

.

    printf("%d seconds\n", (idleTicks > 0)? idleTicks/1000: 0);

.
Summary
The PrintWindow function copies a visual window into the specified device context (DC), typically a printer DC.
.

   static extern bool PrintWindow(IntPtr hwnd, IntPtr hDC, uint nFlags);

.

Private Shared Function PrintWindow(ByVal hwnd As IntPtr, ByVal hDC As IntPtr, ByVal nFlags As UInteger) As Boolean

.

bool success = PrintWindow(form.Handle, dc, 0);

.

PrintWindow Me.hWnd, Me.hDC, 0

.
Documentation
[PrintWindow] on MSDN
.

//Console Prints: 0 0 1

.

public static void CopyPrint()

.

Public Const VK_PRINT = &H2A 'print screen

.

    public const uint VK_PRINT = 0x2A;

.
Summary
The wsprintf API
.

static extern int wsprintf([Out] StringBuilder lpOut, string lpFmt, __arglist);

.
Documentation
[wsprintf] on MSDN

printui

.
Summary
PrintUIEntryW is the main entrypoint to the printer configuration functions in the PrintUI.dll.
.

[DllImport("printui.dll", SetLastError = true, CharSet = CharSet.Unicode)]

.

private static extern void PrintUIEntryW(IntPtr hwnd, IntPtr hinst, string lpszCmdLine, int nCmdShow);

.

PrintUIEntry(IntPtr.Zero, IntPtr.Zero, @"/?", 0);

.

Add per machine printer connection (the connection will be propagated to the user upon logon):

.

PrintUIEntry(IntPtr.Zero, IntPtr.Zero, @"/c \\machine /ga /n\\server\queue", 0);

.

Delete per machine printer connection (the connection will be deleted upon user logon):

.

PrintUIEntry(IntPtr.Zero, IntPtr.Zero, @"/c \\machine /gd /n\\server\queue", 0);

.

View default printer's properties

.

PrintDocument printDoc = new PrintDocument();

.

PrintUIEntryW(IntPtr.Zero, IntPtr.Zero, @"/p /n " + "\ " + printDoc.PrinterSettings.PrinterName + "\ ", 0);

.

// "\"" required for printer name with spaces

.
Documentation
[PrintUIEntry] on MSDN
.
Namespace
printui
.
Description
printui.dll
.
Title
printui.dll

rapi

.

    wsprintf( outBuffer, _T("This is just a Test!") );

psapi

.

            Print("{0:N0} Mb", ((Proc.WorkingSet64 \ 1024) \ 1024))            

.

            Print("{0:N0} Mb", ((Proc.WorkingSet64 \ 1024) \ 1024)) : Print("")

.

        Sub Print(format$, ParamArray args As Object)

coredll

.

     public short dmPrintQuality;

.

        short dmPrintQuality;

.

    Public Property dmPrintQuality() As Short

.
Summary
Add serial debug prints under Windows CE
.

static extern void NKDbgPrintfW(string str);

.

//Taken from http://www.codeproject.com/csharp/timezoneconversions.asp?print=true

Interfaces

.

      void PrintTemplateInstantiation([MarshalAs(UnmanagedType.IDispatch)] object pDisp);

.

      void PrintTemplateTeardown([MarshalAs(UnmanagedType.IDispatch)] object pDisp);

.

      Sub PrintTemplateInstantiation(<MarshalAs(UnmanagedType.IDispatch)> ByVal pDisp As Object)

.

      Sub PrintTemplateTeardown(<MarshalAs(UnmanagedType.IDispatch)> ByVal pDisp As Object)

.

        // the autocomplete object treats pwszQuickComplete as a sprintf

.

        #region Print

.

        /// Prints the current view. Print Dialog does not appear and therefore a document

.

        /// will be printed.with the default printer settings

.

        public void Print()

.

                    InfoPathControl.XmlForm.Print();

.

                    //NOTE: XmlForm.Print(true) will NOT show the print dialog.

.

                    //The print dialog is not supported in hosting scenarios

.

                    throw new HostedException("An error occurred while attempting to print this form", ex);

.

    SHCONTF_NETPRINTERSRCH = 0x0200,

.

        Debug.Print("\r\nCount =>" + iHistoryCount.ToString());

.

                Debug.Print("\r\nTitle =>" + Marshal.PtrToStringUni(pTitle));

.

                Debug.Print("\r\nUrl =>" + Marshal.PtrToStringUni(pUrl));

Enums

.

    /// Only allow the selection of printers. If the user selects anything other than a printer, the OK button is grayed

.

    BIF_BROWSEFORPRINTER = 0x00002000,

.

    ''' Only allow the selection of printers. If the user selects anything other than a printer, the OK button is grayed

.

    BIF_BROWSEFORPRINTER = &H00002000

.

    BIF_BROWSEFORPRINTER As Long = &H00002000

34: CSIDL
.

    CSIDL_PRINTERS          = 0x0004,

.

    CSIDL_PRINTHOOD         = 0x001b,

.

    CSIDL_PRINTERS = &H4

.

    CSIDL_PRINTHOOD = &H1B

.

        /// Returns the dmFields member of the printer driver's DEVMODE structure. The dmFields member indicates which members in the device-independent portion of the structure are supported by the printer driver.

.

        /// Retrieves a list of supported paper sizes. The pOutput buffer receives an array of WORD values that indicate the available paper sizes for the printer. The return value indicates the number of entries in the array. For a list of the possible array values, see the description of the dmPaperSize member of the DEVMODE structure. If pOutput is NULL, the return value indicates the required number of entries in the array.

.

        /// Returns the minimum paper size that the dmPaperLength and dmPaperWidth members of the printer driver's DEVMODE structure can specify. The LOWORD of the return value contains the minimum dmPaperWidth value, and the HIWORD contains the minimum dmPaperLength value.

.

        /// Returns the maximum paper size that the dmPaperLength and dmPaperWidth members of the printer driver's DEVMODE structure can specify. The LOWORD of the return value contains the maximum dmPaperWidth value, and the HIWORD contains the maximum dmPaperLength value.

.

        /// Retrieves a list of available paper bins. The pOutput buffer receives an array of WORD values that indicate the available paper sources for the printer. The return value indicates the number of entries in the array. For a list of the possible array values, see the description of the dmDefaultSource member of the DEVMODE structure. If pOutput is NULL, the return value indicates the required number of entries in the array.

.

        /// If the printer supports duplex printing, the return value is 1; otherwise, the return value is zero. The pOutput parameter is not used.

.

        /// Returns the dmSize member of the printer driver's DEVMODE structure.

.

        /// Returns the number of bytes required for the device-specific portion of the DEVMODE structure for the printer driver.

.

        /// Returns the specification version to which the printer driver conforms.

.

        /// Returns the version number of the printer driver.

.

        /// Retrieves the names of the printer's paper bins. The pOutput buffer receives an array of string buffers. Each string buffer is 24 characters long and contains the name of a paper bin. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 24 characters long. If pOutput is NULL, the return value is the number of bin entries required.

.

        /// Retrieves a list of the resolutions supported by the printer. The pOutput buffer receives an array of LONG values. For each supported resolution, the array contains a pair of LONG values that specify the x and y dimensions of the resolution, in dots per inch. The return value indicates the number of supported resolutions. If pOutput is NULL, the return value indicates the number of supported resolutions.

.

        ///DCTT_BITMAP      Device can print TrueType fonts as graphics.

.

        /// Returns the number of copies the device can print.

.

        /// If the printer supports collating, the return value is 1; otherwise, the return value is zero. The pOutput parameter is not used.

.

        /// Retrieves a list of printer description languages supported by the printer. The pOutput buffer receives an array of string buffers. Each buffer is 32 characters long and contains the name of a printer description language. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 32 characters long. If pOutput is NULL, the return value indicates the required number of array entries.

.

        /// The return value indicates the printer's print rate. The value returned for DC_PRINTRATEUNIT indicates the units of the DC_PRINTRATE value. The pOutput parameter is not used.

.

        DC_PRINTRATE = 26,

.

        /// The return value is one of the following values that indicate the print rate units for the value returned for the DC_PRINTRATE flag. The pOutput parameter is not used.

.

        ///PRINTRATEUNIT_CPS    Characters per second.

.

        ///PRINTRATEUNIT_IPM    Inches per minute.

.

        ///PRINTRATEUNIT_LPM    Lines per minute.

.

        ///PRINTRATEUNIT_PPM    Pages per minute.

.

        DC_PRINTRATEUNIT = 27,

.

        /// The return value is the amount of available printer memory, in kilobytes. The pOutput parameter is not used.

.

        DC_PRINTERMEM = 28,

.

        /// If the printer supports stapling, the return value is a nonzero value; otherwise, the return value is zero. The pOutput parameter is not used.

.

        /// The return value indicates the printer's print rate, in pages per minute. The pOutput parameter is not used.

.

        DC_PRINTRATEPPM = 31,

.

        /// If the printer supports color printing, the return value is 1; otherwise, the return value is zero. The pOutput parameter is not used.

.

        /// Retrieves an array of integers that indicate that printer's ability to print multiple document pages per printed page. The pOutput buffer receives an array of DWORD values. Each value represents a supported number of document pages per printed page. The return value indicates the number of entries in the array. If pOutput is NULL, the return value indicates the required number of entries in the array.

.

        PrintRate=26

.

        PrintRateUnit=27

.

        PrinterMemory=28

.

        PrintRatePpm=31

.

    FILE_DEVICE_PRINTER = 0x18,

.

    FILE_DEVICE_PRINTER = &H18

37: DM
.

/// Selects duplex or double-sided printing for printers capable of duplex printing.

.

   /// Normal (nonduplex) printing.

.

/// Specifies whether collation should be used when printing multiple copies.

.

   /// Do not collate when printing multiple copies.

.

   /// Collate when printing multiple copies.

.

  /// Switches between color and monochrome on color printers.

40: DMDUP
.

/// Selects duplex or double-sided printing for printers capable of duplex printing.

.

   /// Normal (nonduplex) printing.

41: fModes
.

   /// of bytes required by the printer driver's DEVMODE data structure.

.

   /// Output value. The function writes the printer driver's current print settings,

.

   /// Input value. The function presents the printer driver's Print Setup property

.

   /// sheet and then changes the settings in the printer's DEVMODE data structure

.

   /// the printer driver's current print settings with the settings in the DEVMODE

.

   /// specified by pDevModeInput override the printer driver's current print settings.

.

    ///The string contains a non-printable character.

.

    [Description("The string contains a non-printable character.")]

.

    public const int CRYPT_E_INVALID_PRINTABLE_STRING = unchecked((int)0x80092021);

.

    '''The string contains a non-printable character.

.

    <Description("The string contains a non-printable character.")> _

.

    Public Const CRYPT_E_INVALID_PRINTABLE_STRING As Integer = CInt(&H80092021UI)

.

    OLECMDID_PRINT                 = 6,

.

    OLECMDID_PRINTPREVIEW              = 7,

.

    OLECMDID_SHOWPRINT         = 44,

.

    OLECMDID_PRINT2             = 49,

.

    OLECMDID_PRINTPREVIEW2         = 50,

.

    OLECMDID_SETPRINTTEMPLATE         = 51,

.

    OLECMDID_GETPRINTTEMPLATE         = 52,

.

    OLECMDID_GETPRINTTEMPLATE = 52

.

    OLECMDID_PRINT = 6

.

    OLECMDID_PRINT2 = 49

.

    OLECMDID_PRINTPREVIEW = 7

.

    OLECMDID_PRINTPREVIEW2 = 50

.

    OLECMDID_SETPRINTTEMPLATE = 51

.

    OLECMDID_SHOWPRINT = 44

.

   PSD_DEFAULTMINMARGINS =        0x00000000, // default (printer's)

.

   PSD_DISABLEPRINTER =           0x00000020,

.
Summary
Used by the EnumPrinters function in Winspool.
.

enum PrinterEnumFlags {

.

    PRINTER_ENUM_DEFAULT     = 0x00000001,

.

    PRINTER_ENUM_LOCAL       = 0x00000002,

.

    PRINTER_ENUM_CONNECTIONS = 0x00000004,

.

    PRINTER_ENUM_FAVORITE    = 0x00000004,

.

    PRINTER_ENUM_NAME    = 0x00000008,

.

    PRINTER_ENUM_REMOTE      = 0x00000010,

.

    PRINTER_ENUM_SHARED      = 0x00000020,

.

    PRINTER_ENUM_NETWORK     = 0x00000040,

.

    PRINTER_ENUM_EXPAND      = 0x00004000,

.

    PRINTER_ENUM_CONTAINER   = 0x00008000,

.

    PRINTER_ENUM_ICONMASK    = 0x00ff0000,

.

    PRINTER_ENUM_ICON1       = 0x00010000,

.

    PRINTER_ENUM_ICON2       = 0x00020000,

.

    PRINTER_ENUM_ICON3       = 0x00040000,

.

    PRINTER_ENUM_ICON4       = 0x00080000,

.

    PRINTER_ENUM_ICON5       = 0x00100000,

.

    PRINTER_ENUM_ICON6       = 0x00200000,

.

    PRINTER_ENUM_ICON7       = 0x00400000,

.

    PRINTER_ENUM_ICON8       = 0x00800000,

.

    PRINTER_ENUM_HIDE    = 0x01000000,

.

    PRINTER_ENUM_CATEGORY_ALL= 0x02000000,

.

    PRINTER_ENUM_CATEGORY_3D = 0x04000000

.

Public Enum PrinterEnumFlags

.

    PRINTER_ENUM_DEFAULT = &H1

.

    PRINTER_ENUM_LOCAL = &H2

.

    PRINTER_ENUM_CONNECTIONS = &H4

.

    PRINTER_ENUM_FAVORITE = &H4

.

    PRINTER_ENUM_NAME = &H8

.

    PRINTER_ENUM_REMOTE = &H10

.

    PRINTER_ENUM_SHARED = &H20

.

    PRINTER_ENUM_NETWORK = &H40

.

    PRINTER_ENUM_EXPAND = &H4000

.

    PRINTER_ENUM_CONTAINER = &H8000

.

    PRINTER_ENUM_ICONMASK = &HFF0000

.

    PRINTER_ENUM_ICON1 = &H10000

.

    PRINTER_ENUM_ICON2 = &H20000

.

    PRINTER_ENUM_ICON3 = &H40000

.

    PRINTER_ENUM_ICON4 = &H80000

.

    PRINTER_ENUM_ICON5 = &H100000

.

    PRINTER_ENUM_ICON6 = &H200000

.

    PRINTER_ENUM_ICON7 = &H400000

.

    PRINTER_ENUM_ICON8 = &H800000

.

    PRINTER_ENUM_HIDE = &H1000000

.
Documentation
[PrinterEnumFlags] on MSDN
.
Summary
.

/// The printer attributes.

.

internal enum PRINTER_ATTRIBUTES

.

   PRINTER_ATTRIBUTE_NONE = 0,

.

   /// If set, the printer spools and starts printing after the last page is spooled.

.

   /// If not set and PRINTER_ATTRIBUTE_DIRECT is not set, the printer spools and

.

   /// prints while spooling.

.

   PRINTER_ATTRIBUTE_QUEUED = 0x1,

.

   /// Job is sent directly to the printer (it is not spooled).

.

   PRINTER_ATTRIBUTE_DIRECT = 0x2,

.

   /// Printer is default printer.

.

   PRINTER_ATTRIBUTE_DEFAULT = 0x4,

.

   /// Printer is shared.

.

   PRINTER_ATTRIBUTE_SHARED = 0x8,

.

   /// Printer is a network printer connection.

.

   PRINTER_ATTRIBUTE_NETWORK = 0x10,

.

   PRINTER_ATTRIBUTE_HIDDEN = 0x20,

.

   /// Printer is a local printer.

.

   PRINTER_ATTRIBUTE_LOCAL = 0x40,

.

   /// If set, DevQueryPrint is called. DevQueryPrint may fail if the document

.

   /// and printer setups do not match. Setting this flag causes mismatched

.

   PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x80,

.

   /// If set, jobs are kept after they are printed. If unset, jobs are deleted.

.

   PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x100,

.

   /// If set and printer is set for print-while-spooling, any jobs that have

.

   /// completed spooling are scheduled to print before jobs that have not

.

   PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x200,

.

   PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x400,

.

   PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x800,

.

   /// Indicates that only raw data type print jobs can be spooled.

.

   PRINTER_ATTRIBUTE_RAW_ONLY = 0x1000,

.

   /// Indicates whether the printer is published in the directory service.

.

   PRINTER_ATTRIBUTE_PUBLISHED = 0x2000,

.

   /// If set, printer is a fax printer. This can only be set by AddPrinter,

.

   /// but it can be retrieved by EnumPrinters and GetPrinter.

.

   PRINTER_ATTRIBUTE_FAX = 0x4000,

.

   /// Indicates the printer is currently connected through a terminal server.

.

   PRINTER_ATTRIBUTE_TS = 0x8000,

.

   /// The printer was installed by using the Push Printer Connections

.

   /// user policy. See Print Management Step-by-Step Guide.

.

   PRINTER_ATTRIBUTE_PUSHED_USER = 0x20000,

.

   /// The printer was installed by using the Push Printer Connections

.

   /// computer policy. See Print Management Step-by-Step Guide.

.

   PRINTER_ATTRIBUTE_PUSHED_MACHINE = 0x40000,

.

   /// Printer is a per-machine connection.

.

   PRINTER_ATTRIBUTE_MACHINE = 0x0000,

.

   /// A computer has connected to this printer and given it a friendly name.

.

   PRINTER_ATTRIBUTE_FRIENDLY_NAME = 0x100000,

.

   PRINTER_ATTRIBUTE_TS_GENERIC_DRIVER = 0x200000,

.

The definition of PRINTER_ATTRIBUTE_NONE is only to satisfy the rule, that every enum should have a zero value.

.
Documentation
[PRINTER_ATTRIBUTES] on MSDN
47: PROPID
.

        /// Last Printed, DateTime

.

        PID_LASTPRINTED = 11,

.

    Print = 0x2,

.

    Print = &H2

.

    SE_PRINTER,

.

    SE_PRINTER

.

        STYPE_PRINTQ = 1,    // Print Queue

.

        STYPE_HIDDEN_PRINT = 0x80000001,  // Admin Print Shares

.

      ' <summary>Printer Share</summary>

.

      Printer = 1

.

   SHCNF_PRINTERA    = 0x0002,

.

   SHCNF_PRINTERW    = 0x0006,

.

   SHCNF_PRINTER   = SHCNF_PRINTERW

.

    SHCNF_PRINTER = 6

.

    SHCNF_PRINTERA = 2

.

    SHCNF_PRINTERW = 6

52: SHCNF
.

    SHCNF_PRINTERA    = 0x0002,

.

    SHCNF_PRINTERW    = 0x0006,

.

        SHCONTF_NETPRINTERSRCH      = 0x0200,   // hint that client is looking for printers

.

    SHCONTF_NETPRINTERSRCH = &H200     ' hint that client is looking for printers

.

        NETPRINTERSRCH = &H200     '  . The calling application is looking for printer objects.

.

    SIID_PRINTER = 16,

.

    SIID_PRINTERNET = 50,

.

    SIID_PRINTERFAX = 52,

.

    SIID_PRINTERFAXNET = 53,

.

    SIID_PRINTERFILE = 54,

.

    SIID_PRINTER = 16

.

    SIID_PRINTERNET = 50

.

    SIID_PRINTERFAX = 52

.

    SIID_PRINTERFAXNET = 53

.

    SIID_PRINTERFILE = 54

.

    PRINTER = 16

.

    PRINTERNET = 50

.

    PRINTERFAX = 52

.

    PRINTERFAXNET = 53

.

    PRINTERFILE = 54

.

        Print = 0x2A,

.

    VK_PRINT = &H2A         ' // [Print] = 042

.

    ' // UNDEFINED //       ' // [PrintScreen] = 044

56: VK
.

        ///PRINT key

.

        PRINT = 0x2A,

.

        ///PRINT SCREEN key

.

    PRINT_KEY = 42

.

    WinBuiltinPrintOperatorsSid         = 32,

.

    /// The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue.

.

    /// The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly in a printer device context.

.

    PRINT = 0x0317,

.

    /// The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device context, most commonly in a printer device context.

.

    PRINTCLIENT = 0x0318,

.

    '''The WM_PRINT message is sent to a window to request that it draw itself in the specified device context most commonly in a printer device context.

.

    WM_PRINT = &H317

.

    '''The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device context most commonly in a printer device context.

.

    WM_PRINTCLIENT = &H318

.

    '''The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue.

.

    '''  most commonly in a printer device context.

.

    WmPrint = &H317

.

    ''' most commonly in a printer device context.

.

    WmPrintClient = &H318

.

    ''' The message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue.

Constants

.

    public static readonly Guid GUID_DEVCLASS_DOT4PRINT = new Guid("{0x49ce6ac8, 0x6f86, 0x11d2, {0xb1, 0xe5, 0x00, 0x80, 0xc7, 0x2e, 0x74, 0xa2}}");

.

    public static readonly Guid GUID_DEVCLASS_PNPPRINTERS = new Guid("{0x4658ee7e, 0xf050, 0x11d1, {0xb6, 0xbd, 0x00, 0xc0, 0x4f, 0xa3, 0x72, 0xa7}}");

.

    public static readonly Guid GUID_DEVCLASS_PRINTER = new Guid("{0x4d36e979, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}");

.

    public static readonly Guid GUID_DEVCLASS_PRINTERUPGRADE = new Guid("{0x4d36e97a, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}");

60: NERR_
.

        /// <summary> 2150 - The printer does not exist. </summary>

.

        /// <summary> 2151 - The print job does not exist. </summary>

.

        /// <summary> 2152 - The printer destination cannot be found. </summary>

.

        /// <summary> 2153 - The printer destination already exists. </summary>

.

        /// <summary> 2154 - The printer queue already exists. </summary>

.

        /// <summary> 2155 - No more printers can be added. </summary>

.

        /// <summary> 2156 - No more print jobs can be added. </summary>

.

        /// <summary> 2157 - No more printer destinations can be added. </summary>

.

        /// <summary> 2158 - This printer destination is idle and cannot accept control operations. </summary>

.

        /// <summary> 2159 - This printer destination request contains an invalid control function. </summary>

.

        /// <summary> 2160 - The print processor is not responding. </summary>

.

        /// <summary> 2162 - This operation cannot be performed on the print destination in its current state. </summary>

.

        /// <summary> 2163 - This operation cannot be performed on the printer queue in its current state. </summary>

.

        /// <summary> 2164 - This operation cannot be performed on the print job in its current state. </summary>

.

        /// <summary> 2167 - The data type is not supported by the print processor. </summary>

.

        /// <summary> 2168 - The print processor is not installed. </summary>

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: