Page Setup dialog box does NOT remember settings !!

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
 
B

Bernie Yaeger

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
 
H

Herfried K. Wagner [MVP]

* "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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top