473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Where to find the data changed by PageSetupDialog

I do the code at the bottom of this, and later use:
zz = mPD.DefaultPageSettings.PaperSize.Height
and it works most of the time. It's a long story but if I use the
printer's "Custom" size I do not always get the correct results.

Expertimenting isn't getting me anywhere I need someone who
understands the mPD options!

I know I can also get page size by
zz = mpD.PrinterSettings.DefaultPageSettings.PaperSize. Height
Which is the one to use??

All pages in the document use the same settings.
Where should I look for the page sizes and Dpi
set by PageSetupDialog and where should I set margins.

I'd appreciate any info,

PS
Wordpad handles the "Custom" sizes for the printer OK
so it isn't the driver.
Dim lPageSetupDialog As New PageSetupDialog
With lPageSetupDialog
..Document = mPD
..ShowHelp = False
..AllowPaper = True
..AllowMargins = True
..AllowOrientation = True
..AllowPrinter = True
..PageSettings.Margins.Top = 100 * GDI.CSingle(TextBoxTopMargin.Text)
..PageSettings.Margins.Left = 100 * GDI.CSingle(TextBoxLeftMargin.Text)
..PageSettings.Margins.Right = 100 * GDI.CSingle(TextBoxRightMargin.Text)
..PageSettings.Margins.Bottom = 100 * GDI.CSingle(TextBoxBottomMargin.Text)
If .ShowDialog() <> DialogResult.OK Then Exit Sub
Nov 21 '05 #1
0 1023

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trev | last post by:
I have two tables, tblMTO and tblIMPORT_MTO. If I import an entire MTO into the import table I want to create a delta from it (i.e. leave only the changed items). I have a view (simplified) ...
0
by: Andy Sze | last post by:
Visual Studio.net 2003 no yet fix the PageSetupDialog bug. http://support.microsoft.com/?id=814355 Here is my new solution: Private Sub btnPageSetup_Click(ByVal sender As System.Object, _...
6
by: Just Me | last post by:
Dim PageSetupDialog As New PageSetupDialog With PageSetupDialog ..Document = mPD ....snip
2
by: Amjad | last post by:
I use the PageSetupDialog box to allow the user to change the page margins before printing. The problem is when I open the dialog box and type in margin values in millimeters (as it says in the...
1
by: Blaine | last post by:
When I show my Windows Form as a dialog box (ShowDialog(Me)) and click on a button that calls the ShowDialog of either the PageSetupDialog or PrintDialog conrtol, my Windows Form closes After I...
1
by: Dennis | last post by:
I am trying to use the PageSetUpDialog and set some defaults before it shows; PageSetUpDialog1.Document.DefaultPageSettings.Landscape =True...
1
by: Ratan | last post by:
Hello, I am using PageSetupDialog in my application to change the pagesettings of the document but i dont want to show all the page size to the user, I want to show only A3 and A4 size for...
1
by: Ed Sutton | last post by:
My C# app. apparently has problems with PageSettings not being initialized properly after calling PageSetupDialog. If a user selects a non-default printer from PageSetupDialog, the PageSize is...
0
by: ppeterkin | last post by:
I customized a PrintPreviewDialog by adding a button to it's toolstrip that opens up a PageSetupDialog. The problem is changes made to the page setup are not passed to the PrintPreviewDialog until...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.