Solved

page orientation

Posted on 1998-06-05
5
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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