Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 6th, 2008, 06:23 AM
Registered User
 
Join Date: Dec 2008
Location: ,MH,India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to retrive paper sizes of default printer

See the following :

Dim pp As New PrinterSettings
Dim p1 As PaperSize = Nothing

For Each ps As PaperSize In pp.PaperSizes
            If ps.PaperName.Contains("A4") Then
                p1 = ps
                Exit For
            End If
Next
        TextBox1.Text = p1.Width
        TextBox2.Text = p1.Height
        TextBox3.Text = p1.Kind 'paper size
        TextBox4.Text = p1.RawKind

when i set HP Laser Jet 1022 printer as default printer then
i am not getting proper value as paper size
e.g. for A4, paper size is 9 but i am getting some other value.

so is there any other code to get proper paper size to all printer.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Paper Size (custom also) to default Printer gaurikhot .NET Framework 2.0 2 December 6th, 2008 01:50 AM
Default printer anukagni Access 3 March 21st, 2006 08:10 AM
Printer.Paper size problem in VB. :) venkatesh_anmca Access VBA 1 March 21st, 2005 04:09 AM
Reverse feed paper in dot matrix printer yeetesh VB How-To 0 February 15th, 2005 02:46 AM



All times are GMT -4. The time now is 07:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.