明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 674|回复: 2

获取打印机列表的方法

[复制链接]
发表于 2022-8-24 10:13 | 显示全部楼层 |阅读模式
本帖最后由 zhongfeiying 于 2022-8-24 10:18 编辑

大家好!我想获取cad打印中,所有系统打印机的名称,用C#怎么实现呢?非常感谢!


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2022-8-24 10:24 | 显示全部楼层
  1. //打印机名称

  2. {
  3.         PlotSettingsValidator PSV = PlotSettingsValidator.Current;
  4.         StringCollection Devlist = PSV.GetPlotDeviceList;
  5.         for (Int16 i = 0; i <= Devlist.Count - 1; i++) {
  6.                 this.ComboBox1.Items.Add(Devlist(i));
  7.         }
  8.         this.ComboBox1.Text = this.ComboBox1.Items(0);
  9. }
复制代码
 楼主| 发表于 2022-8-24 10:45 | 显示全部楼层

好用好用!多谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-4 14:56 , Processed in 0.362086 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表