473,386 Members | 1,867 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,386 software developers and data experts.

PaperSize property after choosing non-default printer

Hi all,

I have some problems with the printersettings (I use the .net framework 1.1).

I create a new document
pd = new PrintDocument

The pd.DefaultPageSettings are the ones defined by the default printer.

I select a new (not default) printer via PrintDialog:

printDialog = new System.Windows.Forms.PrintDialog();
printDialog.Document = pd;
printDialog.ShowDialog();

If I click on the OK button and look at the PrintDocument after ShowDialog I
see that the printername in the PrinterSettings is indeed OK but for example
the PaperSize is not filled in correctly, this is the default printer
setting.

If I first click on Properties and then OK without changing anyting the
properties are filled in correctly.

Does anyone know how I correctly find the paperSize of the choosen printer
directly?

thanks,
Koert
Sep 7 '06 #1
0 1252

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

Similar topics

112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
0
by: Pedro Feio | last post by:
Hi, I'm having a weird problem setting up the paper size in a C# Windows Forms Application. The code I'm using is something like this: PrintDocument pd = new PrintDocument(); ...
1
by: Break40 | last post by:
I have created a custom papersize 5" x 12". If I send a report using portrait my iformation shows up just fine. If I set landscape to true, and try to print I get nothing or just 1 line per page. ...
0
by: amitpur | last post by:
I want to change the papersize and page orientation programmatically using VBA by checking the width of the text content and tables within the MS Word Document.How can I do this using C# or VB ...
4
by: °Ë´óɽÈË | last post by:
There is a PaperSize class in .net framework. But it has only one constructor: public PaperSize(string name,int width,int height); I want to create a object whose kind isn't "Customer". How shall I...
1
by: bafidi | last post by:
i want to write a code and make the papersize A but this code is wrong what is the true on PrintDocument1.DefaultPageSettings.papersize=A4
16
by: David Gacek | last post by:
Anyone know how to ... make a user control property that shows up in the property pages and allows one to select a value from a set of values ? like a combobox for example ?
0
by: toufik | last post by:
I'm using a printDocument object to print a text. How can I set the paper size fomat to LETTER format here is the code that I started, I don't know if its the good direction....
27
by: sklett | last post by:
I just found myself doing something I haven't before: <code> public uint Duration { get { uint duration = 0; foreach(Thing t in m_things) { duration += t.Duration;
4
by: Shafiaha | last post by:
hai, I am a new user of this site, Hope u people guide me in successful way, my problem is i am completely new to VBA, recently i did a project in that we had a report, initial...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.