作者lucky0623 (lucky0623)
看板Visual_Basic
标题[VB6 ] 要从何编辑!?
时间Sun Mar 30 22:34:18 2008
'以下是完成的模组:
Private Declare Function ShellExecuteAny Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As Any, ByVal lpDirectory As Any, ByVal nShowCmd As
Long) As Long
Const SW_SHOWMINNOACTIVE = 7
Sub PrintAnyFile(FileToPrint As String)
Dim Ret As Long
Ret = ShellExecuteAny(Me.hwnd, "print", FileToPrint, ByVal 0&, ByVal 0&,
SW_SHOWMINNOACTIVE)
End Sub
'实际使用案例如下:
Private Sub Command1_Click()
PrintAnyFile Text1.Text
End Sub
--
我想问一下
如果我要选择列印的页数 而不是整份列印
要从何编辑!?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.127.70.88