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

Paper sizes and HDEVMODE struct

Hi guys
this is the second time I place my question here, so I spect that at least
SOMEBODY takes his time for reading it.

Well, my problem is:

I have an application that needs to dynamically set the sizes of the paper
when printing, and I need custom page sizes, not the normal ones. The
problem is that in windows 2000 / XP, it's necessary to define a paper form
before printing with a custom size.

I have found that the PrinterSettings class and the PageSettings class both
have methods that are related to a HDEVMODE structure. For what I know, this
structure has to do with defining custom paper sizes using direct API calls.
But I'm confused, I have no idea on how to use these methods ( they return
an IntPtr not the structure ). The help has no examples, and it's really bad
in explaining how to use the methods. Microsoft knowledge base seems
obsessed about Web Services (which have nothing to do with printing by the
way) when I ask questions about printing with custom page sizes.

Can somebody show me an example of how to define a custom page size using
..NET???? a link... please somebody!

Please help me! My project is for next monday....
Jul 21 '05 #1
0 1352

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

Similar topics

1
by: JC Mugs | last post by:
Does anyone know how to set user defined paper sizes for and Epson LQ570E Printer under Windows XP Prof? The driver does not allow for user defined paper sizes.. So setting them from a report...
5
by: Ira S | last post by:
I use a DYMO labelwriter with my Access 97 database. I just purchased a new computer and in the report section under page setup/paper size, the new computer keeps changing the size automatically. I...
1
by: Bruce Wood | last post by:
I'm having a devil of a time calling DeviceCapabilities() in order to get the list of paper names / codes / sizes for a printer. Here is my code and the input it produces: static extern Int32...
0
by: Richard Markus | last post by:
How do I programatically set the paper size on the PrintDocument.DefaultPageSettings? I want to set it to one of the named paper sizes. When I try to do so, I get an error message that this...
1
by: lcifers | last post by:
I'm writing a batch printing app that will interface with other applications to print their native documents. All of the documents will be printed on the same size paper. On the main form, where...
0
by: Carlos Kirkconnell | last post by:
Hi guys this is the second time I place my question here, so I spect that at least SOMEBODY takes his time for reading it. Well, my problem is: I have an application that needs to dynamically...
2
by: MLH | last post by:
I got around to reading a bit on paper sizes. A helpful resource I found was http://www.cl.cam.ac.uk/~mgk25/iso-paper.html I would like to know how I can have a custom paper size show up in...
23
by: Al Grant | last post by:
I have a 'printable' button to generate printable output and want this to use A3 if available, irrespective of the user's default printer setting. Is there any way to set a page's preferred...
4
by: Robert Kern | last post by:
Ethan Furman wrote: Right. I believe (but could be wrong) that "char" is defined to be one byte, but that "short", "int", "long", and "long long" are defined as "at least as big as the previous...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...

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.