Results 1 to 3 of 3

Thread: Bug with PageSetupDialog???

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Bug with PageSetupDialog???

    There is something strange going on with the PageSetupDialog ... when I go into the dialog and don't make any changes and press OK ... it changes the margins of the document.

    vb Code:
    1. Dim OldTop=Document.DefaultPageSettings.Margins.Top
    2. Using dlg = New PageSetupDialog()
    3.     dlg.Document = Document
    4.     dlg.ShowDialog(Me)
    5. End Using
    6. Dim NewTop=Document.DefaultPageSettings.Margins.Top

    After running the above OldTop=10 and NewTop=39...

    Basically my computer is in mm's instead of inches (since I am not American), and I think it is doing some internal conversion??? since 10 mms = 0.393701?

    Any ideas on how to overcome this? or will I have to write a new PageSetupDialog?

    Thanks in advance,
    Kris

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: Bug with PageSetupDialog???

    I think you'd have to do the conversion yourself. here's some information on msdn...

    PageSettings.Margins Property:

    http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx

  3. #3

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: Bug with PageSetupDialog???

    But the point is I open the dialog ... make NO changes and press OK ... and IT changes the values ... if I set my computer to inches it does not do this btw

    And my conversion is correct ... I think it (the dialog) converts the values to mms for the dialog when it opens but then DOESN'T convert it back to inches when the dialog closes...

    ... ahh well .. will be a simple dialog to clone anyway ... should be a piece of cake since I just did a re-write of the entire PrintPreviewControl from scratch! ... just because I wanted continuous pages!

    Kris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width