.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 7th, 2007, 11:56 AM
brad-jenny brad-jenny is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 1 brad-jenny User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 53 sec
Reputation Power: 0
How to print wide datagrid?

I have a wide datagrid and I would like to print it in landscapge setting. But it always print portrait instead. this is the code I used:

Dim pd As New PrintDocument
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
Dim psd As New PageSetupDialog
Dim printerSet As New PrinterSettings
pd.DefaultPageSettings.Landscape = True

printerSet.DefaultPageSettings.Landscape = True
With psd
.AllowMargins = True
.AllowOrientation = True
.AllowPaper = True
.ShowHelp = True
.ShowNetwork = True

.Document = pd
End With

psd.ShowDialog()

Dim myPaintArgs = New PaintEventArgs(e.Graphics, New Rectangle (New Point(0, 0), DataGrid1.Size))
Me.InvokePaint(DataGrid1, myPaintArgs)
pd.Print()


can anybody give me some idea? Thank you!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > How to print wide datagrid?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT