| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 921 人关注过本帖
标题:两台打印机同时打印
取消只看楼主 加入收藏
pylyh
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2013-8-26
结帖率:56.25%
收藏
已结贴  问题点数:20 回复次数:4 
两台打印机同时打印
请问,如何用程序设置一份表,两台打印机同时打印出来?一台是本地打印机,另一台是网络打印机。
搜索更多相关主题的帖子: 打印机 如何 网络 
2015-05-20 22:46
pylyh
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2013-8-26
收藏
得分:0 
回复 2楼 吹水佬
请问,“SET DEVICE TO PRINTER”这句是什么意思?
2015-05-20 23:20
pylyh
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2013-8-26
收藏
得分:0 
请大家帮忙看看怎样设置?现在程序是本地打印,怎样才能加入网络一起打印。

DEFINE CLASS printform AS Form
 TOP = 250
 LEFT = 150
 HEIGHT = 110
 WIDTH = 330
 BORDERSTYLE = 2
 CAPTION = '打印窗口'
 CLOSABLE = .F.
 CONTROLBOX = .T.
 MAXBUTTON = .F.
 MINBUTTON = .F.
 MOVABLE = .F.
 VISIBLE = .T.
 BACKCOLOR = RGB(255,255,255)
 NAME = 'printform'
 ADD OBJECT PRINTLABEL AS LABEL WITH TOP = 20 , LEFT = 20 , FONTSIZE = 16 , AUTOSIZE  ;
      = .T. , FONTITALIC = .T. , CAPTION = '打印窗口欢迎您!' , BACKCOLOR =  ;
      RGB(192,192,192) , FORECOLOR = RGB(255,0,0) , NAME = 'printlabel'
 ADD OBJECT PRINTSTAR AS COMMANDBUTTON WITH FONTSIZE = 11 , FONTNAME = '宋体' ,  ;
      CAPTION = '开始打印' , HEIGHT = 25 , TOP = 70 , LEFT = 70 , WIDTH = 80 ,  ;
      VISIBLE = .T. , NAME = 'printstar'
 ADD OBJECT PRINTCANC AS COMMANDBUTTON WITH FONTSIZE = 11 , FONTNAME = '宋体' ,  ;
      CAPTION = '取消打印' , HEIGHT = 25 , TOP = 70 , LEFT = 170 , WIDTH = 80 ,  ;
      VISIBLE = .T. , NAME = 'printcanc'
 ADD OBJECT PRINTFINISH AS COMMANDBUTTON WITH FONTSIZE = 11 , FONTNAME = '宋体' ,  ;
      CAPTION = '完 成' , HEIGHT = 25 , TOP = 70 , LEFT = 80 , WIDTH = 50 ,  ;
      VISIBLE = .F. , NAME = 'printfinish'
 ADD OBJECT PRINTFAIL AS COMMANDBUTTON WITH FONTSIZE = 11 , FONTNAME = '宋体' ,  ;
      CAPTION = '失 败' , HEIGHT = 25 , TOP = 70 , LEFT = 180 , WIDTH = 50 ,  ;
      VISIBLE = .F. , NAME = 'printfail'

PROCEDURE printstar.Click
 IF SYS(13) = 'OFFLINE'
    ?? CHR(7)
    THISFORM.PRINTLABEL.CAPTION = '打印机没有准备好! 请检查.'
    RETURN
 ENDIF
 SET DEVICE TO PRINTER
 SET PRINTER FONT '宋体' , 12.3
 @ 4.900 , 10 SAY LYSARY(1,1)
 ENDIF
 @ 18.500 , 82 SAY CZY
 SET PRINTER TO
 SET DEVICE TO SCREEN
 THISFORM.PRINTLABEL.CAPTION = '打印完成?'
 THISFORM.PRINTSTAR.VISIBLE = .F.
 THISFORM.PRINTCANC.VISIBLE = .F.
 THISFORM.PRINTFINISH.VISIBLE = .T.
 THISFORM.PRINTFAIL.VISIBLE = .T.
ENDPROC
*------

PROCEDURE printcanc.Click
  CKFORMSET.PRINTFORM.HIDE
 CKFORMSET.CKFORM.ALWAYSONTOP = .T.
 CKFORMSET.CKFORM.ENABLED = .T.
 CKFORMSET.CKFORM.FINISH.ENABLED = .F.
 CKFORMSET.CKFORM.CKXG.ENABLED = .F.
 CKFORMSET.CKFORM.BYFXG.ENABLED = .F.
 CKFORMSET.CKFORM.CKFORMCLS.ENABLED = .T.
  CKFORMSET::INIT
  CKFORMSET.CKFORM.REFRESH
 CKFORMSET.CKFORM.HZHTEXTBOX.DISABLEDBACKCOLOR = RGB(192,192,192)
 CKFORMSET.CKFORM.HZMCTEXTBOX.DISABLEDBACKCOLOR = RGB(192,192,192)
 CKFORMSET.CKFORM.KCJS1.DISABLEDFORECOLOR = RGB(255,255,255)
 CKFORMSET.CKFORM.KCBS1.DISABLEDFORECOLOR = RGB(255,255,255)
 = OBJECTSET(1,255,.T.)
 = OBJECTSET(2,192,.F.)
 = OBJECTSET(3,192,.F.)
 = OBJECTSET(4,192,.F.)
 = BYF(1)
  CKFORMSET.CKFORM.SPPH1.SETFOCUS
ENDPROC
*------

PROCEDURE printfinish.Click
 THISFORM.PRINTSTAR.VISIBLE = .T.
 THISFORM.PRINTCANC.VISIBLE = .T.
 THISFORM.PRINTFINISH.VISIBLE = .F.
 THISFORM.PRINTFAIL.VISIBLE = .F.
  PRINTFORM.PRINTCANC::CLICK
ENDPROC
*------

PROCEDURE printfail.Click
 THISFORM.PRINTSTAR.VISIBLE = .T.
 THISFORM.PRINTCANC.VISIBLE = .T.
 THISFORM.PRINTFINISH.VISIBLE = .F.
 THISFORM.PRINTFAIL.VISIBLE = .F.
 THISFORM.PRINTLABEL.CAPTION = '打印窗口欢迎您!'
ENDPROC

[ 本帖最后由 pylyh 于 2015-5-20 23:27 编辑 ]
2015-05-20 23:25
pylyh
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2013-8-26
收藏
得分:0 
回复 3楼 hu9jj
是的,只要同时打印就行了。
2015-05-20 23:32
pylyh
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2013-8-26
收藏
得分:0 
回复 9楼 TonyDeng
请问怎样重定向?
2015-05-30 15:11
快速回复:两台打印机同时打印
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017996 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved