472,805 Members | 826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

can't print in landscape


I have a pricelist that I want to print in landscape. I also tried to set
the pagesettings in the printpage event but still no effect. What is wrong
private sub btn1_click

PrintDocument1.DefaultPageSettings.Landscape = True


Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e
As System.Drawing.Printing.PrintPageEventArgs) Handles

streamToPrint = New StreamReader(filename)

Dim line As String

line = streamToPrint.ReadLine()

Dim d As New Font("Arial", 12)

Dim f As New SolidBrush(Color.Black)

Dim i As Integer = 60

Dim tel As Int16

tel = 0

While (line <> Nothing)

e.Graphics.DrawString(line, d, f, 60, i)

line = streamToPrint.ReadLine()

i = i + 15

End While


End Sub

Nov 20 '05 #1
0 1535

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

Similar topics

by: gilga123 | last post by:
Trying & trying ad infinitum to print page in landscape mode from Java program - orientation is correct landscape but printing width will NOT go to landscape - always prints in portrait mode width...
by: gilga123 | last post by:
Trying & trying ad infinitum to print page in landscape mode from Java program - orientation is correct landscape but printing width will NOT go to landscape - always prints in portrait mode width...
by: Devesh Aggarwal | last post by:
I developed reports in Crytsal Reports 9.0 in landscape mode. When i print the same from crystal reports it prints perfectly in Landscape even if the printer setting is set to potrait by default. ...
by: WJA | last post by:
A user of one of my databases is having the following problem. When they open any report in print preview that is formatted for landscape, it will display in portrait view when first opened. If...
by: Steph. | last post by:
Hi, Is there a BUG in the printdialog ? When I create a PrintDialog ans set the "DefaultPageSettings.Landscape" property to "false" and then display the dialog, select "Landscape" and click OK,...
by: Siv | last post by:
Hi, I am working on a VB.NET application that uses the Print Preview. When I call up the print preview and print from my laser printer the whole page comes out no problem. When I do the same...
by: BlueSky | last post by:
Hi, I want to print in Landscape format from an aspx page (when ever the user chooses print from the browser or a print button on the form). I load aspx controls dynamically on the page. I used...
by: nuhura01 | last post by:
I want a printing properties to be set to landscape mode, so that when the user click a print button, it will print in landscape mode automatically. I use this code in the code-behind of the web...
by: Deano | last post by:
I'm in the situation of having to print a form - not a report. This will fit nicely in a landscape format but by default it prints portrait. Is there any code to make it play nice?
by: Gianni | last post by:
hello dudes i want to print a html page in landscape format. Is there a possebility to do it with css? i read about a landscape task in css which workes with the opera- browser. but it should...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.