以下是引用西山居士在2007-6-11 20:03:32的发言:
你试试下面代码,我没测试:
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Command1_Click()
Call keybd_event(vbKeySnapshot, theForm, 0, 0)
Picture1.Picture = Clipboard.GetData(vbCFBitmap)
End Sub
Private Sub Command2_Click()
CommonDialog1.ShowPrinter
End Sub
请教:如何才能把文件从指定的打印机上打印出来,而不用CommonDialog1控件来设置打印机?
我的电脑上装有两台打印机,一台是HP激光打印机,而另外一台是SATO条码打印机,我用
Printer.paintpicture picture1.Image,0,0 语句 总是会打印到默认的打印机,
怎样才能不通过CommonDialog1控件,来设定指定的打印机呢?