Introduction
I often admired the Windows Print and Fax Viewer for printing images. I often would ignore the individual application's print facilities and go to the Windows Print and Fax Viewer for printing images. If you want to add an excellent print facility to your project, the following code will do that:
Private Sub PrintPreviewToolStripMenuItem_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles PrintPreviewToolStripMenuItem.Click
bm.Save(D2007DirDefault & "\prj\PrintScratch\PrintPreview.bmp")
Dim procid
procid = Shell("rundll32.exe C:\WINDOWS\System32\shimgvw.dll," & _
"ImageView_Fullscreen " & _
D2007DirDefault & "\prj\PrintScratch\PrintPreview.bmp")
End Sub
Private Sub PreviewDesignsWindowsPictureAndFaxViewerToolStripMenuItem_Click(_
ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles PreviewDesignsWindowsPictureAndFaxViewerToolStripMenuItem.Click
Dim procid
procid = Shell("rundll32.exe C:\WINDOWS\System32\shimgvw.dll," & _
"ImageView_Fullscreen " & _
SObj.DP.designs End Sub
Private Sub SelectDirectoryToPreviewWindowPictureAndFaxViewerToolStripMenuItem_Click(ByVal _
sender As System.Object, ByVal e As System.EventArgs) Handles _
SelectDirectoryToPreviewWindowPictureAndFaxViewerToolStripMenuItem.Click
Dim newfile As String
Me.FolderBrowserDialog1.ShowNewFolderButton = False
Me.FolderBrowserDialog1.SelectedPath = "C:\"
If Me.FolderBrowserDialog1.ShowDialog() <> DialogResult.OK Then Exit Sub
newfile = Me.FolderBrowserDialog1.SelectedPath
Dim procid
procid = Shell("rundll32.exe C:\WINDOWS\System32\shimgvw.dll," & _
"ImageView_Fullscreen " & newfile)
End Sub