I was trying to pring multi-page tiffs via Visual Basic 6.0.
Right now I have the VB program take the file in via a command line and then pass the file name off to my function for printing.
I had this little function that appeared to work fine:
Private Function PrintFile(strfilename As String) As Boolean
Dim hWnd As Long
hWnd = GetTopWindow(0)
On Error GoTo PrintFileError
ShellExecute hWnd, "print", strfilename, vbNull, vbNull, SW_SHOWMINIMIZED
PrintFile = True
PrintFile = False
MsgBox "Error #" & Err.Number & vbCrLf & Err.Description, vbCritical, "Error Printing File"
This works fine for Windows 2000/NT but not for XP.
In XP it opens its own image viewer but does not print it.
I do not even have a form on in the VB project as the file to be printed is just passed in via the command line. (For example: printthis <<mytiff.tiff>>)
Does anyone have code that will print a multi-page TIFF in just about any operating system (windows based)?