資源簡介
打印機ESC指令
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Runtime.InteropServices;
using?System.Management;
using?System.Drawing.Printing;
using?System.Security;
using?System.Printing;
using?System.IO;
namespace?打印機ESC指令
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????foreach?(String?printername?in?PrinterSettings.InstalledPrinters)
????????????{
????????????????comboBox1.Items.Add(printername);
????????????}
????????}
????????[StructLayout(LayoutKind.Sequential?CharSet?=?CharSet.Ansi)]
????????public?class?DOCINFOA
????????{
????????????[MarshalAs(UnmanagedType.LPStr)]
????????????public?string?pDocName;
????????????[MarshalAs(UnmanagedType.LPStr)]
????????????public?string?pOutputFile;
????????????[MarshalAs(UnmanagedType.LPStr)]
????????????public?string?pDataType;
????????}
????????[DllImport(“winspool.Drv“?EntryPoint?=?“OpenPrinterA“?SetLastError?=?true?CharSet?=?CharSet.Ansi?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?OpenPrinter([MarshalAs(UnmanagedType.LPStr)]?string?szPrinter?out?IntPtr?hPrinter?IntPtr?pd);
????????[DllImport(“winspool.Drv“?EntryPoint?=?“ClosePrinter“?SetLastError?=?true?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?ClosePrinter(IntPtr?hPrinter);
????????[DllImport(“winspool.Drv“?EntryPoint?=?“StartDocPrinterA“?SetLastError?=?true?CharSet?=?CharSet.Ansi?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?StartDocPrinter(IntPtr?hPrinter?Int32?level?[In?MarshalAs(UnmanagedType.LPStruct)]?DOCINFOA?di);
????????[DllImport(“winspool.Drv“?EntryPoint?=?“EndDocPrinter“?SetLastError?=?true?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?EndDocPrinter(IntPtr?hPrinter);
????????[DllImport(“winspool.Drv“?EntryPoint?=?“StartPagePrinter“?SetLastError?=?true?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?StartPagePrinter(IntPtr?hPrinter);
????????[DllImport(“winspool.Drv“?EntryPoint?=?“EndPagePrinter“?SetLastError?=?true?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?EndPagePrinter(IntPtr?hPrinter);
????????[DllImport(“winspool.Drv“?EntryPoint?=?“WritePrinter“?SetLastError?=?true?ExactSpelling?=?true?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?WritePrinter(IntPtr?hPrinter?IntPtr?pBytes?Int32?dwCount?out?Int32?dwWritten);
????????private?void?button1_Click(object
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????11264??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\bin\Debug\打印機ESC指令.exe
?????文件??????30208??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\bin\Debug\打印機ESC指令.pdb
?????文件??????24224??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\bin\Debug\打印機ESC指令.vshost.exe
?????文件????????490??2019-03-19?12:46??打印機ESC指令\打印機ESC指令\bin\Debug\打印機ESC指令.vshost.exe.manifest
?????文件???????8471??2018-02-28?10:36??打印機ESC指令\打印機ESC指令\Form1.cs
?????文件???????3784??2018-02-28?01:52??打印機ESC指令\打印機ESC指令\Form1.Designer.cs
?????文件???????5817??2018-02-28?01:52??打印機ESC指令\打印機ESC指令\Form1.resx
?????文件???????5420??2018-02-26?02:29??打印機ESC指令\打印機ESC指令\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????7286??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????1510??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.csproj.FileListAbsolute.txt
?????文件????????977??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.csproj.GenerateResource.Cache
?????文件??????10684??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.csprojResolveAssemblyReference.cache
?????文件??????11264??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.exe
?????文件????????180??2018-02-28?05:45??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.Form1.resources
?????文件??????30208??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.pdb
?????文件????????180??2018-02-28?05:45??打印機ESC指令\打印機ESC指令\obj\x86\Debug\打印機ESC指令.Properties.Resources.resources
?????文件????????499??2018-02-25?04:55??打印機ESC指令\打印機ESC指令\Program.cs
?????文件???????1386??2018-02-25?04:55??打印機ESC指令\打印機ESC指令\Properties\AssemblyInfo.cs
?????文件???????2888??2018-02-25?04:55??打印機ESC指令\打印機ESC指令\Properties\Resources.Designer.cs
?????文件???????5612??2018-02-25?04:55??打印機ESC指令\打印機ESC指令\Properties\Resources.resx
?????文件???????1105??2018-02-25?04:55??打印機ESC指令\打印機ESC指令\Properties\Settings.Designer.cs
?????文件????????249??2018-02-25?04:55??打印機ESC指令\打印機ESC指令\Properties\Settings.settings
?????文件???????3787??2018-02-28?01:43??打印機ESC指令\打印機ESC指令\打印機ESC指令.csproj
?????文件????????896??2018-02-25?04:55??打印機ESC指令\打印機ESC指令.sln
????..A..H.?????26112??2018-03-23?00:02??打印機ESC指令\打印機ESC指令.suo
????..A..H.?????26112??2018-03-23?00:02??打印機ESC指令\打印機ESC指令.v12.suo
????..AD...?????????0??2019-02-28?05:08??打印機ESC指令\打印機ESC指令\obj\x86\Debug\TempPE
?????目錄??????????0??2020-09-11?02:46??打印機ESC指令\打印機ESC指令\obj\x86\Debug
?????目錄??????????0??2020-01-01?08:23??打印機ESC指令\打印機ESC指令\bin\Debug
?????目錄??????????0??2019-05-31?02:14??打印機ESC指令\打印機ESC指令\obj\x86
............此處省略8個文件信息
- 上一篇:三菱plc上載最終程序.gxw
- 下一篇:U8核心類庫
評論
共有 條評論