·  Start ·  Programme ·  Codes ·  Tipps ·  ActiveX ·  Tutorials · 



Drucken von Dateien, ohne sie zu öffnen. Benötigt wird eine Form und ein Commandbutton.

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

Private Function PrintFile(sFilePath As String)
    Call ShellExecuteAny(Me.hwnd, "print", sFilePath, _
    ByVal 0&, ByVal 0&, SW_SHOWMINNOACTIVE)
End Function

Private Sub Command1_Click()
' Datei drucken ohne sie zu öffnen
    Call PrintFile("D:\test.txt")
End Sub
Aktualisiert: 12.02.2008, 14:11 Uhr Copyright © 2001 - 2010 by ST-software Navigation zurück  |  Navigation vorwärts  |  Zum Seitenanfang     
Ihre IP: 38.107.191.83 ·  Seite erstellt in: 0.684 Sekunden ·  Dateigröße:  2630 Bytes