【问题标题】:Can I get the images for printers in .NET? [duplicate]我可以在 .NET 中获取打印机的图像吗? [复制]
【发布时间】:2013-11-25 19:54:55
【问题描述】:

如果我在我的机器 (Windows 7) 上打开“设备和打印机”,我会在打印机上看到类似这样的内容:

有没有办法在我的 WPF 应用程序中从操作系统获取这些图像?我想像这样列出打印机,但现在我只有打印机的文本(而不是图像)。

【问题讨论】:

    标签: c# .net windows printers


    【解决方案1】:

    您需要致电SetupDiLoadDeviceIcon。您必须阅读 MSDN 并稍微使用 p-Invoke 才能从托管方开始工作......

    信息来自注册表,但您不应该自己查找。见Providing Vendor Icons for the Shell and AutoPlay。

    【讨论】:

      猜你喜欢
      • 2011-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多