- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
如何使用 C# 显示“设备和打印机”窗口,如此屏幕截图所示?
最佳答案
应用程序可以通过执行 control.exe
以编程方式打开控制面板in a new process . MSDN states调用控制面板项的首选方法是使用其规范名称,该名称是非本地化的并且跨版本稳定。从 Windows Vista 开始,每个控制面板项都有一个规范的名称; MSDN 提供a list对于标准 Windows 控制面板项目。此列表表明设备和打印机 项目的规范名称是Microsoft.DevicesAndPrinters
.
可以通过调用 control.exe
在新进程中打开控制面板项目以规范名称作为参数(/name <canonical name or GUID>
):
//note: assumes (using System.Diagnostics and System.IO)
string controlpath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.System),
"control.exe"); // path to %windir%\system32\control.exe
// (ensures the correct control.exe)
Process.Start(controlpath, "/name Microsoft.DevicesAndPrinters");
关于c# - 通过 C# 显示 "Devices and Printers"窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17339243/
我创建了一个 Delphi 服务,负责将 QuckReports 打印到 Printer.Printers 列表中包含的特定打印机。我将打印机名称传递给例程,然后它在 Printer.printers
powershell "get-content foo.txt|Out-Printer" 只要 foo.txt 是英文的,一切都很好(大部分情况下) 如果 foo.txt 包含 unicode 字符,
我将几个zpl文件发送到打印机进行测试,并且工作正常。 之后,我从UPS接收base64编码的zpl数据,并创建一个文件并通过Java小程序将其发送到打印机,现在我发送给它的任何zpl命令或文件都无济
我想在 ZPL 代码中注释行,例如: ^XA ^MMT ^LL0531 ^PW1280 ^LS0 ^FT81,528^A0B,29,28^FH\^FDTEXT^FS //
显然不是: use strict; use warnings; use Data::Printer; my @values = 1 .. 99; p @values[0..9]; 退货 10 docu
我使用 Zebra Designer 创建标签。但是我有一个问题来居中我的元素。 事实上,当我用 Zebra Designer 创建一个文本框时,它有一个固定的长度,当我替换里面的文本时(例如通过一个
我正在使用 Zebra MZ320 打印机来集成黑标。当黑标设置为True时,我面临问题。在纸张上遇到黑标后,打印机进纸2-3行 用于成功校准黑标的命令: ! DF CONFIG.SYS
我正在开发一个 chrome 应用程序,它需要经常与打印机通信,因此我将直接向打印机发送数据而无需打印对话框,因为该 chrome 提供 chrome.printerProvider API。但 ap
我刚刚修改了 Zebra 打印机的标签。我几乎完成了它,但我目前停留在第一行,我在多个站点上阅读了不同的主题,但没有任何帮助我得到我想要的东西。我们的标签是10cm高15cm宽,下面一行需要从中间到边
我知道这很容易解决,但我已经为此奋斗了一个小时。我需要不断从用户那里获取单词,直到他们输入“退出”并将其写入进程中的文件中。但问题是,它出现了“输入单词:”,但是当我输入它并按回车键时,它不会接受它,
我正在尝试在我的打印机 CANON MB5000 上使用 java print 打印一个文本文件。它适用于 Linux 但不适用于 Windows。在 Windows 上,这里支持文档风格: for
我想测试 IPP 应该具备的一些功能(即监控印象数;参见 this question),但我还没有得到硬件。我如何模拟这样的打印机?是否有虚拟 IPP 打印机的代码? 我将在 Linux 或 Wind
从标题可以看出,这个问题过去已经讨论过。我已将之前的帖子作为引用,并尝试在 Zebra 标签打印机上打印位图图像。我无法打印我正在寻找的图像。请不要忽略,因为它已经讨论过了。 请查看下面提到的代码片段
我正在使用 Crystal Reports 将订单打印到 KOT 打印机。我有四台不同的 KOT 打印机。根据分配的相应打印机名称打印项目。 这工作正常,但为了提高打印速度,我选中了“无打印机”选项。
我正在使用 Zebra GT800 标签打印机,标签角色大小为 2.5' * 1.75'。我正在努力使用 ZPL 命令将其调整为内部标签。我尝试使用在 ZPL 的用户指南中阅读的粗体文本中的几个值,但
我的客户端在使用旧的 Brother 打印机从 JAVA 应用程序打印时遇到问题。他得到的异常(exception)是“打印机不接受作业”。 其他应用程序(不是 java 应用程序)设法使用这些打印机
如何为“文本”添加换行符?比如说: Hello World 会变成 Hello World 无论如何,我可以为我的代码添加一个换行符吗? ^FT78,76^A0N,28,28^FH\^FDHello\
当执行powershell cmdlet Get-Printer时,我很好奇它从何处获取信息。它依靠WMI吗?它会解析注册表吗?我遇到过Get-Printer的响应不同于Windows设备和打印机控制
我正在将 ZPL 代码传递给 Zebra 打印机。在这个 ZPL 代码中,我有一部分会生成二维码。 QR 码的值来 self 在为 WM6.5 开发的移动应用程序中使用条形码扫描功能获得的字符串。扫描
我有一卷 5.1cm x 1.6cm(每行两个)的标签,我需要在每行上打印两个不同的标签(expected result),但是 ZPL 格式的打印命令只打印一个标签并送入下一个标签,将相邻的标签留空
我是一名优秀的程序员,十分优秀!