Page Setup dialog box does NOT remember settings !!

  • Thread starter Thread starter Christian
  • Start date Start date
C

Christian

Hi,

I'm using the page setup dialog box as follows :


Imports System.Drawing.Printing
Public Class Form1 : Inherits System.Windows.Forms.Form
Dim m_pageSettings As PageSettings

Private Sub btnPageSetup_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Handles btnPageSetup.Click
Dim pagesetupDlg As New PageSetupDialog
If m_pageSettings Is Nothing Then
m_pageSettings = New PageSettings
End If
pagesetupDlg.PageSettings = m_pageSettings
pagesetupDlg.ShowDialog()
End Sub

when the dialogbox pops up do I change ONLY the left margin from 10 to 9
(for example)
I close the dialog box.... reopen it : ALL the margins (left, top bottom,
right) have changed ???

how come ?
thnx
Christian
 
Hi Cristian,

I seem to remember this problem - and related problems - unique to vs .net
2002, but fixed in 2003. Which version are you using?

Bernie Yaeger
 
* "Christian said:
I'm using the page setup dialog box as follows :

Imports System.Drawing.Printing
Public Class Form1 : Inherits System.Windows.Forms.Form
Dim m_pageSettings As PageSettings

Private Sub btnPageSetup_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Handles btnPageSetup.Click
Dim pagesetupDlg As New PageSetupDialog
If m_pageSettings Is Nothing Then
m_pageSettings = New PageSettings
End If
pagesetupDlg.PageSettings = m_pageSettings
pagesetupDlg.ShowDialog()
End Sub

when the dialogbox pops up do I change ONLY the left margin from 10 to 9
(for example)
I close the dialog box.... reopen it : ALL the margins (left, top bottom,
right) have changed ???

Seems to be a well-known bug. Workaround:

<http://www.mvps.org/dotnet/dotnet/samples/printing/downloads/PrintFramework.zip>
 
Back
Top