Solved

page orientation

Posted on 1998-06-05
5
159 Views
Last Modified: 2010-08-05
one:  how to set printer to portrait/landscape within Visual Basic version 3.0
two:  how to print top to bottom text instead of left to right
0
Comment
Question by:jcadams
  • 3
  • 2
5 Comments
 

Author Comment

by:jcadams
ID: 1462653
Edited text of question
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1462654
For question one:
Check out MSKB Question Q80185 at
http://support.microsoft.com/support/kb/articles/q80/1/85.asp

For question two:
I don't think you could do this.  Are you talking about printing Kanji?
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1462655
By the way.  Asking two unrelated questions at one time is not fair.  You should have posted two separate questions.
0
 

Author Comment

by:jcadams
ID: 1462656
Lousy answer
0
 
LVL 6

Accepted Solution

by:
clifABB earned 100 total points
ID: 1462657
Lousy question.


Add the following code to the global module:
Type OrientStructure
      Orientation As Long
      Pad As String * 16
End Type
Const PORTRAIT = 1
Const LANDSCAPE = 2
Const GETSETPAPERORIENT = 30

' Enter the following Declare statement:
Declare Function Escape% Lib "GDI" (ByVal hDc%, ByVal nEsc%, ByVal nLen%, lpData As OrientStructure, lpOut As Any)

The following code will print in landscape:

Dim Orient As OrientStructure

Printer.Print ""

Orient.Orientation = LANDSCAPE

x% = Escape(Printer.hDC, GETSETPAPERORIENT, Len(Orient), Orient, NULL)
Printer.EndDoc

Printer.Print "Should print in landscape mode"
Printer.EndDoc

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question