PRB: Behavior Differences of Print Dialog Box on Different Platforms (173981)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Basic Learning Edition for Windows 6.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Basic Professional Edition for Windows 5.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
- Microsoft Visual Basic Professional Edition for Windows 6.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
- Microsoft Visual Basic Enterprise Edition for Windows 5.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
- Microsoft Visual Basic Enterprise Edition for Windows 6.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0, when used with:
- the operating system: Microsoft Windows XP
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT
This article was previously published under Q173981 SYMPTOMS
On Windows XP, Windows 2000, or Windows NT 4.0, when you call the ShowPrinter method of the CommonDialog control, some of the properties of the Printer object, such as the Copies and the Orientation properties, are not affected by changes that the user selects in the Print dialog box.
This problem does not occur with the same properties of the Printer object on Microsoft Windows Millennium Edition (Me), Microsoft Windows 98, or Microsoft Windows 95.
CAUSE
This problem occurs because the Printer object and the CommonDialog control do not share information. The object and the control have their own device context. For more information, see the "References" section.
RESOLUTION
You can work around this problem for the properties that the CommonDialog control exposes. To demonstrate this, replace the code for Form1 of the sample project in the "More Information" section with the following code, which assigns the property values from the CommonDialog control to the Printer object:
With CommonDialog1
.ShowPrinter
Printer.Copies = .Copies
Printer.Orientation = .Orientation
Debug.Print "Copies = " & CStr(Printer.Copies) & vbCrLf & _
"Orientation = " & CStr(Printer.Orientation)
End With
STATUSThis behavior is by design.REFERENCES
For additional information about the CommonDialog control, click the article number below to view the article in the Microsoft Knowledge Base:
198712 PRB: CommonDialog Changes System Wide Printer Properties
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbAPI kbCmnDlg kbCmnDlgPage kbCmnDlgPrint kbprb kbprint KB173981 |
---|
|