Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

page orientation

Posted on 1998-06-05
5
Medium Priority
?
172 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
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…
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…
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…
Suggested Courses

670 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