Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Impression de fichier PDF

2 réponses
Avatar
ROLLOT Pascal Jean
Bonjour,

J'ai un petit souci. Comment fait-on pour imprimer sans l'ouvrir un fichier
PDF sous vb6?

Merci de votre aide et bonne soirée.

2 réponses

Avatar
Jacques93
Bonjour ROLLOT Pascal Jean,
ROLLOT Pascal Jean a écrit :
Bonjour,

J'ai un petit souci. Comment fait-on pour imprimer sans l'ouvrir un fichier
PDF sous vb6?

Merci de votre aide et bonne soirée.





Avec l'API 'ShellExecute' ? :

Private Const SW_SHOWNORMAL = 1

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long


Private Sub Command1_Click()
ShellExecute Me.hwnd, "print", "C:toto.pdf", _
vbNullString, vbNullString, SW_SHOWNORMAL
End Sub


--

Cordialement,

Jacques.
Avatar
ROLLOT Pascal Jean
Merci beaucoup et bonne journée.


"Jacques93" a écrit dans le message de news:

Bonjour ROLLOT Pascal Jean,
ROLLOT Pascal Jean a écrit :
Bonjour,

J'ai un petit souci. Comment fait-on pour imprimer sans l'ouvrir un
fichier PDF sous vb6?

Merci de votre aide et bonne soirée.



Avec l'API 'ShellExecute' ? :

Private Const SW_SHOWNORMAL = 1

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long


Private Sub Command1_Click()
ShellExecute Me.hwnd, "print", "C:toto.pdf", _
vbNullString, vbNullString, SW_SHOWNORMAL
End Sub


--

Cordialement,

Jacques.