CommonDialog的问题还是Win2k的问题,请MS支持及MVP解答

Corny 2002-05-01 02:39:29
使用CommonDialog.ShowPrint方法设置缺省打印机属性,flags=cldPDPrintSetup,并且设置了PrinterDefault=True属性,却仍然不能正确地修改缺省打印机的相关参数,包括打印纸类型等,请问是为什么?

环境:Win2k Sp2,VB6 SP5
...全文
70 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
acptvb 2002-05-10
  • 打赏
  • 举报
回复
感谢您使用微软产品。

在Windows NT version 4.0, Windows 2000, or Windows XP平台下,在VB6.0中,调用CommonDialogbox的ShowPrint方法以后,Printer的一些属性例如Copies和Orientation不会改变,而在Windows 95, Windows 98, or Windows ME下工作正常,您可以通过以下方法来解决这个问题,如下例:
With CommonDialog1
.ShowPrinter
Printer.Copies = .Copies
Printer.Orientation = .Orientation
Debug.Print "Copies = " & CStr(Printer.Copies) & vbCrLf & "Orientation = " & CStr(Printer.Orientation)
End With

您可以参考以下文章了解更多信息:
PRB: CommonDialog Changes System Wide Printer Properties (Q198712)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q198712
微软全球技术中心 VB技术支持
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
Corny 2002-05-07
  • 打赏
  • 举报
回复
要用Printer设置就有用它的道理,要不然Windows为什么还要有修改设置呢,都在打印前选择不就得了么
Corny 2002-05-06
  • 打赏
  • 举报
回复
to marsxia(秋):没关系呀,如果是你能解决,我推荐你做MVP也不错。不过如果解答不了,就别吹牛了,当心吹爆。
Chice_wxg 2002-05-06
  • 打赏
  • 举报
回复
agree with marsxia(秋)
此言极是,呵呵
wqb 2002-05-06
  • 打赏
  • 举报
回复
那段程序中不是有选择纸型吗?选中然后立刻打印不就可以了吗,为什么非要用printer设置?
MarsXia 2002-05-06
  • 打赏
  • 举报
回复
这个问题我解答过一次,本来想再次来解答你这个问题,忽然想到我既不是MVP,也不是MS支持,想想就不凑热闹算了。:)
wqb 2002-05-05
  • 打赏
  • 举报
回复
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q282474#2
HOWTO: Print Using Custom Page Sizes on Windows NT and Windows 2000 (Q282474)
water_j 2002-05-05
  • 打赏
  • 举报
回复
gz!
Corny 2002-05-05
  • 打赏
  • 举报
回复
to wqb(啊喂):仍然无法改变默认打印机的属性,甚至用Printer=...都不能改变默认打印机,是否BUG,API也不管用呀

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧