看板 Visual_Basic 關於我們 聯絡資訊
'以下是完成的模組: 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