vbPrnDlg: Collate display bug.
- From: michael.f.larson@xxxxxxxxx
- Date: 28 Oct 2005 18:37:26 -0700
I have been doing some tests with displaying the vbPrnDlg version of
the common dialog for Printer.
When I display the printer, I want to populate certain various defaults
(taken from elsewhere in code). All that is fine, EXCEPT for the
Collate button.
There are four scenarios I tested.
1. Print ALL pages WITH collate.
2. Print ALL pages WITHOUT collate
3. Print "some" pages with collate
4. Print "some" pages without collate.
I am keeping the flags to a minimum to illustrate the bug.
For the first two, the dialog shows up with NO collate checkbox at all,
and the image is for not-collated. No way for user to change
For the third and fourth, it shows up AS collated, with a checkbox
for collate checked.
In each of those cases, one is completely wrong.
This is actually very important to me for my app.
Does anyone have any experience with this in VB6, and can offer a
solution how to predictably set the Collate Status of those four
scenarios listed?
Code snippet below. The sample requires the (downloadable) Microsoft
vbPrnDlg.dll be registered on your machine, and then a separate call
(i.e. command button) would call the sub with different case options to
test. I had four command boxes, each calling a different of the four
scenarios.
Thanks,
- M
sub showPrtDlg(cmdOption as integer)
Dim printDlg As PrinterDlg
Set printDlg = New PrinterDlg
printDlg.PrinterName = Printer.DeviceName
printDlg.DriverName = Printer.DriverName
printDlg.Port = Printer.Port
printDlg.PaperBin = Printer.PaperBin
printDlg.Copies = 2
Select Case cmdPrint
Case 1
printDlg.Flags = VBPrinterConstants.cdlPDAllPages _
Or VBPrinterConstants.cdlPDCollate
Case 2
printDlg.Flags = VBPrinterConstants.cdlPDAllPages
Case 3
printDlg.Flags = VBPrinterConstants.cdlPDPageNums _
Or VBPrinterConstants.cdlPDCollate
printDlg.Min = 2
printDlg.Max = 3
printDlg.FromPage = 2
printDlg.ToPage = 3
Case 4
printDlg.Flags = VBPrinterConstants.cdlPDPageNums
printDlg.Min = 2
printDlg.Max = 3
printDlg.FromPage = 2
printDlg.ToPage = 3
End Select
Printer.TrackDefault = False
If Not printDlg.ShowPrinter(Me.hWnd) Then
'Debug.Print "Cancel Selected"
Exit Sub
End If
.
- Follow-Ups:
- Re: vbPrnDlg: Collate display bug.
- From: Mike Williams
- Re: vbPrnDlg: Collate display bug.
- From: Mike Williams
- Re: vbPrnDlg: Collate display bug.
- Prev by Date: Re: String or Numeric Variable?
- Next by Date: Faxing in VB.NET
- Previous by thread: Virtual DOS Window in VB?
- Next by thread: Re: vbPrnDlg: Collate display bug.
- Index(es):