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]

msvcrt

.

static extern int sprintf(

.

static extern int swprintf(

.

static extern int sprintf([In,Out]StringBuilder buffer, String fmt,

.

static extern int sprintf([In,Out]StringBuilder buffer, String fmt,

.

static extern int sprintf([In,Out]StringBuilder buffer, String fmt,

.

  Public Shared Function sprintf(ByVal TargetString As System.Text.StringBuilder,

.

swprintf(buffer, "Greetings from thread %d\n", __arglist(Thread.CurrentThread.ManagedThreadId));

.
VB.NET
Investigate the use of System.Text.StringBuilder.AppendFormat before using sprintf.
.
Documentation
[sprintf] on MSDN

opengl32

.

        public void glPrint(String outputString,Int32 x1, Int32 y1, Int32 x2,

.

            // Print the string if there is room

.

        public Int32 getPrintWidth(String outputString)

mpr

.

        RESOURCETYPE_PRINT,

.

  //      RESOURCETYPE_PRINT      = 2,

.

    Print = 2,

.

        RESOURCETYPE_PRINT,

.

    RESOURCETYPE_PRINT = 0x00000002,

.

    RESOURCETYPE_PRINT = &H2

.

localName is the local name for the network resource (drive or printer)

.

    PRINT   = 0x00000002,

comdlg32

.

     CF_PRINTERFONTS = 0x00000002,

.

     CF_BOTH = (CF_SCREENFONTS | CF_PRINTERFONTS),

.

private static extern bool PrintDlgEx([In(), Out()] PRINTDLGEX lppd);

.

Private Shared Function PrintDlgEx(<[In](), Out()> ByVal lppd As PRINTDLGEX) As Boolean

.

System.Windows.Forms.PrintDialog

.

Public Class WWPrintDialog

.

    Private m_bAllowPrintToFile As Boolean = False

.

    Private m_sPrinterName As String = String.Empty

.

    Private Shared Function PrintDlgEx(<[In](), Out()> ByVal lppd As PRINTDLGEX) As Boolean

.

        Return InvokePrintDlgEx()

.

    Public Function InvokePrintDlgEx() As DialogResult

.

        Dim _pdex As PRINTDLGEX = New PRINTDLGEX()

.

        Dim _ppr As PRINTPAGERANGE = New PRINTPAGERANGE()

.

        Dim prnsettings As Printing.PrinterSettings = New Printing.PrinterSettings()

.

        _pdex.lpPrintTemplateName = Nothing

.

        _pdex.Flags = PRINTFLAG.PD_NOSELECTION Or PRINTFLAG.PD_NOPAGENUMS

.

        Return IIf(PrintDlgEx(_pdex), DialogResult.OK, DialogResult.Cancel)

.

Public Class PRINTDLGEX

.

    Public lpPrintTemplateName As String

.

Public Class PRINTPAGERANGE

.

Public Class PRINTFLAG

.

    Public Const PD_PRINTTOFILE As Int32 = 32

.

    Public Const PD_PRINTSETUP As Int32 = 64

.

    Public Const PD_ENABLEPRINTHOOK As Int32 = 4096

.

    Public Const PD_ENABLEPRINTTEMPLATE As Int32 = 16384

.

    Public Const PD_ENABLEPRINTTEMPLATEHANDLE As Int32 = 65536

.

    Public Const PD_DISABLEPRINTTOFILE As Int32 = 524288

.

    Public Const PD_HIDEPRINTTOFILE As Int32 = 1048576

.
Documentation
[PrintDlgEx] on MSDN
.

private static extern bool PrintDlgEx([In(), Out()] PRINTDLGEX lppd);

.

Private Shared Function PrintDlgEx(<[In](), Out()> ByVal lppd As PRINTDLGEX) As Boolean

.

System.Windows.Forms.PrintDialog

.

Public Class WWPrintDialog

.

    Private m_bAllowPrintToFile As Boolean = False

.

    Private m_sPrinterName As String = String.Empty

.

    Private Shared Function PrintDlgEx(<[In](), Out()> ByVal lppd As PRINTDLGEX) As Boolean

.

        Return InvokePrintDlgEx()

.

    Public Function InvokePrintDlgEx() As DialogResult

.

        Dim _pdex As PRINTDLGEX = New PRINTDLGEX()

.

        Dim _ppr As PRINTPAGERANGE = New PRINTPAGERANGE()

.

        Dim prnsettings As Printing.PrinterSettings = New Printing.PrinterSettings()

.

        _pdex.lpPrintTemplateName = Nothing

.

        _pdex.Flags = PRINTFLAG.PD_NOSELECTION Or PRINTFLAG.PD_NOPAGENUMS

.

        Return IIf(PrintDlgEx(_pdex), DialogResult.OK, DialogResult.Cancel)

.

Public Class PRINTDLGEX

.

    Public lpPrintTemplateName As String

.

Public Class PRINTPAGERANGE

.

Public Class PRINTFLAG

.

    Public Const PD_PRINTTOFILE As Int32 = 32

.

    Public Const PD_PRINTSETUP As Int32 = 64

.

    Public Const PD_ENABLEPRINTHOOK As Int32 = 4096

.

    Public Const PD_ENABLEPRINTTEMPLATE As Int32 = 16384

.

    Public Const PD_ENABLEPRINTTEMPLATEHANDLE As Int32 = 65536

.

    Public Const PD_DISABLEPRINTTOFILE As Int32 = 524288

.

    Public Const PD_HIDEPRINTTOFILE As Int32 = 1048576

.
Documentation
[PrintDlgEx] on MSDN

rapi

.

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

kernel32

.

            Debug.Print(CStr(CheckRemoteDebuggerPresent(proc.Handle, bool)))

.

    Printer                = 0x00000018,

.

Get OutputDebugString function implementation that accepts variable number of arguments like printf here (http://www.go4expert.com/forums/showthread.php?t=871)

.

//sample is probably a bad idea, but it will "trim down" the memory footprint of a .Net App (or at least the value reflected in Task Manager).

.

    Debug.Print(CStr(bytearray(0)) + " " + CStr(bytearray(elements - 1)) + " " + CStr(bytearray(elements)))

.

    Debug.Print(CStr(bytearray(0)) + " " + CStr(bytearray(elements - 1)) + " " + CStr(bytearray(elements)))

xpsprint

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

netapi32

.

    ''' Admin, Accounts, Print, or Server Operator group membership is required to successfully execute NetMessageBufferSend on a remote server.

.

            PrintQueueServer = 0x00000200,

.

            MicrosoftFileAndPrintServer= 0x00004000,

.

            SV_TYPE_PRINTQ_SERVER = 0x00000200,

.

    PrintQueueServer = 0x00000200,

.

    MicrosoftFileAndPrintServer= 0x00004000,

.

            STYPE_PRINTQ = 1,

.

        ' <summary>Printer Share</summary>

.

        Printer = 1

.

            STYPE_PRINTQ = 1,

.

        STYPE_PRINTQ = 1,

.
Summary
The NetUseAdd function establishes a connection between the local computer and a remote server. You can specify a local drive letter or a printer device to connect. If you do not specify a local drive letter or printer device, the function authenticates the client with the server for future connections.

rasapi32

.

        SecureFileAndPrint = 0x1,

setupapi

.

Text1.Text = SendToUsbPrinter(”Hello world.”)

.

Function SendToUsbPrinter(PrintOut As String) As Boolean

.

SendToUsbPrinter = False

.

Debug.Print DeviceName

.

Debug.Print “Open failed on ” & DeviceName

.

Ret = WriteFile(DeviceHandle, PrintOut, _

.

Len(PrintOut), BytesWritten, 0)

.

Debug.Print “Sent ” & BytesWritten & ” bytes.”

.

SendToUsbPrinter = True

iphlpapi

.

        IF_TYPE_ISO88025_CRFPRINT = 98,  // ISO 802.5 CRFP

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

userenv

.

        printf("%d %s\n", (int)size, path);

.

        printf("%d %s\n", (int)size, path);

Structures

.
Summary
Contains information about the initialization and environment of a printer or a display device.
.

    Int16 dmPrintQuality;

.

    Public dmPrintQuality As Short

.

This code (taken from .NET source code) is working with System.Drawing.Printing.PrinterSettings.Gethdevmode, where default structure doesn't work for me.

.

    public Int16 dmPrintQuality;

.

struct FAX_PRINT_INFO {

.
Documentation
[FAX_PRINT_INFO] on MSDN
.

    DVASPECT_DOCPRINT = 8

.

    DVASPECT_DOCPRINT = 8

.
Summary
The JOB_INFO_1 structure specifies print-job information such as the job-identifier value, the name of the printer for which the job is spooled, the name of the machine that created the print job, the name of the user that owns the print job, and so on.
.

   public string pPrinterName;

.

   public UInt32 PagesPrinted;

.

        ///PRINT key

.

        PRINT = 0x2A,

.

        ///PRINT SCREEN key

.

        PRINT = 0,

.

public class PRINTDLG

.

    public IntPtr lpfnPrintHook;

.

    public IntPtr lpPrintTemplateName;

.

    public IntPtr hPrintTemplate;

.

Structure PRINTDLG

.
Documentation
[PRINTDLG] on MSDN
.
Summary
.

struct PRINTER_DEFAULTS {

.

/// The PRINTER_DEFAULTS structure specifies the default data type,

.

/// environment, initialization data, and access rights for a printer.

.

internal class PRINTER_DEFAULTS

.

   /// default data type for a printer.

.

   /// default environment and initialization data for a printer.

.

   /// Specifies desired access rights for a printer.

.

   /// The <see cref="OpenPrinter(string, out IntPtr, IntPtr)"/> function uses

.

   /// this member to set access rights to the printer. These rights can affect

.

   /// the operation of the SetPrinter and DeletePrinter functions.

.

Structure PRINTER_DEFAULTS

.

If you use the class-version, you only need one OpenPrinter declaration, because you can pass NULL or an object references.

.
Documentation
[PRINTER_DEFAULTS] on MSDN
.
Summary
Used by the EnumPrinters call in Winspool.
.

    public struct PRINTER_INFO_2

.

        public string pPrinterName;

.

        public string pPrintProcessor;

.

    Private Structure PRINTER_INFO_2

.

        Public pPrinterName As String

.

        Public pPrintProcessor As String

.

public PRINTER_ATTRIBUTES Attributes;

.

See the PRINTER_ATTRIBUTES enum for more details.

.

If you only want to get or set the DEVMODE struct, you can use the PRINTER_INFO_9 struct instead.

.
Documentation
[PRINTER_INFO_2] on MSDN
.
Summary
Used by the EnumPrinters call in Winspool.
.

    public struct PRINTER_INFO_5

.

        public string pPrinterName;

.

Structure PRINTER_INFO_5

.

public PRINTER_ATTRIBUTES Attributes;

.

See the PRINTER_ATTRIBUTES enum for more details.

.
Documentation
[PRINTER_INFO_5] on MSDN
.
Summary
.

/// The PRINTER_INFO_9 structure specifies the per-user default printer settings.

.

internal class PRINTER_INFO_9

.

   /// default printer data such as the paper orientation and the resolution.

.
Documentation
[PRINTER_INFO_9] on MSDN
.

     ushort PrintNameOffset;

.

     ushort PrintNameLength;

.

       (4 * sizeof(ushort)) + SubstituteNameLength + PrintNameLength +

.

PrintNameOffset

.

    Offset, in bytes, of the print name string in the PathBuffer array.

.

PrintNameLength

.

    Length, in bytes, of the print name string. If this string is null-terminated,

.

    PrintNameLength does not include space for the null character.

.

    the substitute name string and print name string.

.

  internal ushort PrintNameOffset;

.

  internal ushort PrintNameLength;

.

    internal ushort PrintNameOffset;

.

    internal ushort PrintNameLength;

.

        rdb.PrintNameOffset = (ushort)(targetLenBytes + 2);

.
Summary
Informs the print spooler that a document is to be spooled for printing.
.

[DllImport("winspool.drv", EntryPoint="StartDocPrinterW", SetLastError=true,

.

private static extern uint StartDocPrinter(

.

  IntPtr hPrinter,

.

[DllImport("winspool.drv", EntryPoint="StartDocPrinterA", SetLastError=true,

.

private static extern uint StartDocPrinter(

.

  IntPtr hPrinter,

.

Structure StartDocPrinter

.

  Public Function StartDocPrinter(hPrinter As IntPtr, Level As Integer, ByRef pDocInfo As DOC_INFO_1W) As Long

.

  Public Function StartDocPrinter(hPrinter As IntPtr, Level As Integer, ByRef pDocInfo As DOC_INFO_1A) As Long

.
Documentation
[StartDocPrinter] on MSDN

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

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));

urlmon

.

  Debug.Print PtrToString(buffAddr)

gdi32

.
Summary
.

in Pointer to a null-terminated character string that specifies the name of the specific output device being used, as shown by the Print Manager (for example, Epson FX-80). It is not the printer model name. The lpszDevice parameter must be used.

.

        static bool PrinterSupportsPostScript(string printername)

.

                hDC =CreateDC(null,printername,0,IntPtr.Zero);

.

                if(test==0) return false; // printer driver does not support GETTECHNOLOGY Checks.

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


 
Access PInvoke.net directly from VS: